A HTTP/SOCKS5 tunnel for Twisted.
Project description
A HTTP/SOCKS5 tunnel for Twisted.
Supports:
HTTP
HTTP + Basic authentication
SOCKS5
Usage
import twunnel
protocolFactory = ..
configuration = \
{
}
tunnel = twunnel.Tunnel(configuration)
tunnel.connect("www.google.com", 80, protocolFactory)
from twisted.internet import ssl
import twunnel
protocolFactory = ..
configuration = \
{
}
contextFactory = ssl.ClientContextFactory()
tunnel = twunnel.Tunnel(configuration)
tunnel.connect("www.google.com", 443, protocolFactory, contextFactory)
import twunnel
protocolFactory = ..
configuration = \
{
"PROXY_SERVERS":
[
{
"TYPE": "HTTP",
"ADDRESS": "127.0.0.1",
"PORT": 8080,
"AUTHENTICATION":
{
"USERNAME": "1",
"PASSWORD": "2"
}
}
]
}
tunnel = twunnel.Tunnel(configuration)
tunnel.connect("www.google.com", 80, protocolFactory)
import twunnel
protocolFactory = ..
configuration = \
{
"PROXY_SERVERS":
[
{
"TYPE": "SOCKS5",
"ADDRESS": "127.0.0.1",
"PORT": 1080
}
]
}
tunnel = twunnel.Tunnel(configuration)
tunnel.connect("www.google.com", 80, protocolFactory)
import twunnel
protocolFactory = ..
configuration = \
{
"PROXY_SERVERS":
[
{
"TYPE": "HTTP",
"ADDRESS": "127.0.0.1",
"PORT": 8080,
"AUTHENTICATION":
{
"USERNAME": "1",
"PASSWORD": "2"
}
},
{
"TYPE": "SOCKS5",
"ADDRESS": "127.0.0.1",
"PORT": 1080
}
]
}
tunnel = twunnel.Tunnel(configuration)
tunnel.connect("www.google.com", 80, protocolFactory)
License
Uses the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
twunnel-0.1.0.zip
(8.0 kB
view hashes)