http-proxy

command module
v0.0.1-mobile Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2015 License: Apache-2.0 Imports: 24 Imported by: 0

README

HTTP Proxy in Go

Build Status

Run

First get dependencies:

go get -t

Then run with:

test/run-server.sh

Test

*Keep in mind that cURL doesn't support tunneling through an HTTPS proxy, so if you use the -https option you have to use other tools for testing.

Without the header, it will respond 404 Not Found. In order to avoid this and test it as a normal proxy, use the -disableFilters flag.*

You can either use the proxy as a regular HTTP proxy or with Lantern-specific extensions.

Testing as a regular HTTP proxy

Run the server as follows:

test/run-server.sh

Test direct proxying with cURL:

curl -kvx localhost:8080 http://www.google.com/humans.txt
curl -kvx localhost:8080 https://www.google.com/humans.txt

Test HTTP connect with cURL:

curl -kpvx localhost:8080 http://www.google.com/humans.txt
curl -kpvx localhost:8080 https://www.google.com/humans.txt
Testing with Lantern extensions and configuration

Run the server with:

test/run-server.sh -https -enablefilters -enablereports -token=<your-token>

You have two options to test it: the Lantern client or checkfallbacks.

Keep in mind that they will need to send some headers in order to avoid receiving 404 messages (the chained server response if you aren't providing them).

Currently, the only header you need to add is X-Lantern-Device-Id.

If you are using checkfallbacks, make sure that both the certificate and the token are correct. A 404 will be the reply otherwise. Running the server with -debug may help you troubleshooting those scenarios.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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