https://github.com/matiasinsaurralde/transports
A HTTP proxy that aims to support different transports.
https://github.com/matiasinsaurralde/transports
golang proxy security tor transport
Last synced: over 1 year ago
JSON representation
A HTTP proxy that aims to support different transports.
- Host: GitHub
- URL: https://github.com/matiasinsaurralde/transports
- Owner: matiasinsaurralde
- License: mit
- Created: 2016-05-27T01:32:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T13:22:19.000Z (over 9 years ago)
- Last Synced: 2025-03-15T07:55:04.041Z (over 1 year ago)
- Topics: golang, proxy, security, tor, transport
- Language: Go
- Homepage:
- Size: 294 KB
- Stars: 112
- Watchers: 15
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# transports
[](https://app.wercker.com/project/bykey/8e1b0669d07cb25706624d2c2e7619e6)
[](https://gitter.im/matiasinsaurralde/transports?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A HTTP proxy that aims to support different transports.
## Motivation
I started the [facebook tunnel](https://github.com/matiasinsaurralde/facebook-tunnel) project two years ago and I thought that it could be better to follow a modular approach for supporting other services (chat systems, platforms, *gram, *book?).
This repository includes some code to explore the idea.
### Why not a TCP/UDP tunnel?
At this time I'm not planning tuntap support (like I did in the previous project). I would like to focus on the transports. Also, I think that a HTTP proxy is easier to port and run, especially when considering that the project is built on Golang, where the output is a static binary. For example, it'll be very easy to build a binary for ARM.
## Available transports
I've been working on these transports during the past week:
### Facebook Transport (early stage, sorry!)
This transport uses [surf](https://github.com/headzoo/surf), a stateful web browser built in Go.
Load your credentials by using ```export``` or the ```.env``` file:
```
FB_LOGIN=youraccount@facebook.com
FB_PASSWORD=supersecretpass
FB_FRIEND=yourtunnelfriend
```
I'm looking for collaborators from countries where the [Internet.org](https://info.internet.org/en/) campaigns like "Free Basics" are active, they could benefit from it :)
### Whatsapp Transport (status: you can perform some GETs)
This transport uses a [HTTP wrapper](https://github.com/matiasinsaurralde/yowsup-http-wrapper) for [yowsup](https://github.com/tgalal/yowsup) to send/receive Whatsapp messages.
I recorded this small video, showing some interactions with this transport. For the demonstration I point my browser to the proxy and perform a test request to Akamai, the communication happens between two Whatsapp clients running on the same computer:
[](http://bit.ly/1TTu9wo)
It would be good to have a "pure Golang" Whatsapp library but I think the current approach is fine for experimentation (anyone considering writing this?).
The following environment variables are used:
```
WA_CLIENT_LOGIN=123412341
WA_CLIENT_PASSWORD=whatsappgeneratedpassword123
WA_CLIENT_CONTACT=43214321
WA_SERVER_LOGIN=123412341
WA_SERVER_PASSWORD=whatsappgeneratedpassword123
```
**Requires Python 3**
## Marshalers
I'm working on providing a [set of "marshalers" and a simple API to combine them](https://github.com/matiasinsaurralde/transports/tree/master/marshalers), this could be useful for conducting network/system usage benchmark experiments & performing a good choice.
[Protocol buffers](https://github.com/google/protobuf) sound like a good option, instead of JSON (which is what I'm actually using for the Whatsapp transport). Also [brotli](https://github.com/google/brotli) looks promising. A combination of these two is a very interesting thing to consider.
## Tor support
There's a Tor integration idea for the server side, I've did a few tests with it, under the following scenario:

The [Whatsapp transport](https://github.com/matiasinsaurralde/transports/blob/master/transport_whatsapp.go) includes a flag to enable Tor (```UseTor```), I'm expecting to extend this flag to any transport.
The Tor support is achieved by overriding the default ```http.Transport``` dialer with a [custom one](https://github.com/matiasinsaurralde/transports/blob/master/transport.go#L24).
## Ideas/to-do
* Handle SSL.
* Extend the test coverage.
* Think about some way of debugging the transports/traffic.
* Run basic tests in additional platforms (e.g. ARM).
* Plan strategies for mobile support, Golang is doing [great progress](https://github.com/golang/go/wiki/Mobile) on this.
* Multiplexing
## Contributors
* [Matias Insaurralde](https://github.com/matiasinsaurralde)
* [Carlos Carvallo](https://github.com/carloscarvallo)
## License
[MIT](https://github.com/matiasinsaurralde/transports/blob/master/LICENSE)