retracer

package module
v0.0.0-...-9185888 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2018 License: BSD-2-Clause Imports: 23 Imported by: 0

README

retracer: URL Redirect Tracer

h12.io/retracer is a Go package that can trace any HTTP(S) URL redirections regardless they are 3xx redirections, http-eqiv refreshes, Javascript navigations and the non-standard HTTP Refresh header.

Features

  • Cookie, Referer and custom headers supported
  • Avoid unnecessary resource loading, like: CSS, images and iframes

Install

sudo apt-get install surf xvfb
go get h12.io/retracer

Tips

It is recommended to use Xvfb to prevent Surf window appearing during Javascript tracing.

xvfb :99 &
DISPLAY=:99 ./your_program

To build Surf:

sudo apt-get install libwebkitgtk-dev
make

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJSRedirectionTimeout = errors.New("JS redirection timeout")
)

Functions

This section is empty.

Types

type JSTracer

type JSTracer struct {
	Timeout time.Duration
	Certs   *mitm.CertPool
}

func (*JSTracer) Trace

func (t *JSTracer) Trace(uri string, header http.Header, body []byte) (string, error)

type Tracer

type Tracer struct {
	RoundTripper http.RoundTripper
	Header       http.Header
	Timeout      time.Duration
	Certs        *mitm.CertPool
	Debug        bool
}

func (*Tracer) Trace

func (t *Tracer) Trace(uri string, callback func(string, *http.Response) error) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL