Commit Graph

30 Commits (2001f0b698183b998dbf8e52f5d40a0d82aeef09)

Author SHA1 Message Date
Yawning Angel 697b51b4bd Fix minor style issues pointed out by golint. 10 years ago
Yawning Angel bd2bef2ead Fix import lines so other people using go get works. 10 years ago
Yawning Angel 49d3f6e8bb Run go fmt on proxy_http.go (No functional changes). 10 years ago
Yawning Angel c05a7a2e34 Add support for HTTP CONNECT proxies.
Joining a SOCKS dialer on the list of things the Golang runtime really
should have is a HTTP CONNECT dialer.  There's a full fledged HTTP
client and server there, but not this.  Why?  Who knows.

This fixes issue #7.
10 years ago
Yawning Angel f0d8923a9a Move the SOCKS4 code off into it's own little getto.
Part of issue #7.
10 years ago
Yawning Angel 3c64e04e02 Add support for SOCKS4.
Despite the unfortunate scheme name, this really is SOCKS4, and not 4a,
as the torrc Socks4Proxy option only supports addresses and not FQDNs.

Part of issue #7.
10 years ago
Yawning Angel f0090b5127 Rename to be consistent. 10 years ago
Yawning Angel 92494597ce Wire in go.net/proxy, enabling SOCKS5 via TOR_PT_PROXY.
With tor patched to support 8402, obfs4 bootstraps via a SOCKSv5 proxy
now.  Other schemes will bail with a PROXY-ERROR, as the go.net/proxy
package does not support them, and I have not gotten around to writing
dialers for them yet (next on my TODO list).

Part of issue #7.
10 years ago
Yawning Angel b3d17c327b Validate the host component of the proxy URI.
Part of issue #7.
10 years ago
Yawning Angel d5c3a25dec Parse TOR_PT_PROXY and support sending DONE/PROXY-ERROR.
Currently obfs4proxy is hardcoded to always PROXY-ERROR, despite a
valid proxy uri being passed in the env var.  Once the dialer portion
of the code is done, this will be changed.

Part of issue #7.
10 years ago
Yawning Angel f04fd166ac Move the supplemental pt config routines to pt_extra.go 10 years ago
Yawning Angel e77ddddf4d Add support for IAT obfuscation (disabled by default).
When enabled, inter-packet delay will be randomized between 0 and 10
ms in 100 usec intervals.  As experiences from ScrambleSuit (and back
of the envelope math based on how networks work) show, this is
extremely expensive and artificially limits the throughput of the link.

When enabled, bulk transfer throughput will be limited to an average of
278 KiB/s.
10 years ago
Yawning Angel 7dd875fe4c Revert "Use the new goptlib goodies."
This reverts commit 8d61c6bcc6.

On second thought, don't do this.  API not final, and some of the stuff
might not be a good idea after all.
10 years ago
Yawning Angel 8d61c6bcc6 Use the new goptlib goodies.
As of `15b960d55905877a840fe605a41a8139bffb5329` goptlib supports
IsClient, IsServer, and handling the StateLocation.

Yes this means you need to use goptlib out of git.
10 years ago
Yawning Angel 7c37109c48 Add support for a log scrubber and log a session id.
This fixes #6.
10 years ago
Yawning Angel b50a8bdf24 Finish adding godoc comments to all public interfaces. 10 years ago
Yawning Angel 676e0428e7 Allow logging to be disabled (default).
Part of #6, still need to make logs nicer.
10 years ago
Yawning Angel 7709069617 Send the DRBG seed as a packetTypePrngSeed post server handshake.
This fixes #3, and brings the code to be on par with the delopyed
versions of ScrambleSuit in terms of features.
10 years ago
Yawning Angel 6f875c99a9 Load the drbg-seed from the ServerTransportOptions args.
This also adds the drgb-seed option to the `-gen` obfs4proxy output.
10 years ago
Yawning Angel b9e3aedfb1 Make the output from "-gen" be more useful. 10 years ago
Yawning Angel 50cc180084 Use os.MkdirAll() for creating the pt state directory. 10 years ago
Yawning Angel 8e552dbd48 Remove a newline to make godoc work (No functional changes). 10 years ago
Yawning Angel 64212e1029 Add vim modelines to some files (No functional changes). 10 years ago
Yawning Angel 8daf42a13e Fix up import. 10 years ago
Yawning Angel d2b2e383fd Fix copyLoop to break out the other goroutine on graceful exit.
This should fix sockets getting stuck in CLOSE_WAIT.
10 years ago
Yawning Angel 51a8dd5a86 Fix logging again.
On second thought instead of using log.Panicf(), panic() and do the
logging with recover().  This somewhat centralizes logging in
obfs4proxy, which will be easier to change when I invariably decide to
do logging differently in the future.
10 years ago
Yawning Angel c3acefb7e5 Log and propagate errors between the 2 goroutines in copyLoop.
This fixes #1.
10 years ago
Yawning Angel c2f1e8ecb7 Clean up the logging a bit. 10 years ago
Yawning Angel 68c48cb383 Run go fmt on obfs4proxy.go (No functional changes). 10 years ago
Yawning Angel 8e14ed44ad Move to a unified client/server binary, and fix bugs.
* The old and the busted: obfs4-[client,server].
 * The new hotness: obfs4client.
 * Add obfs4.ServerHandshake() that servers need to call after a
   successful return from Accept().  This allows implementations to
   move the handshake into a goroutine or whatever.
10 years ago