gumblex / ptproxy

Turn any pluggable transport for Tor into an obfuscating TCP tunnel.
MIT License
161 stars 43 forks source link

ptproxy and shadowsocks? #10

Closed g18z0n closed 8 years ago

g18z0n commented 8 years ago

i'm trying to make ptproxy talk with shadowsocks for using with firefox browser but is not working.

at the moment i'm testing locally following this guide http://www.jimgray.tk/2016/04/12/ptproxy/

$ bin/obfs4proxy -version
obfs4proxy-0.0.7-dev
$ ssserver -c shadowsocks_server.json
{
    "server":"127.0.0.1",
    "server_port":8077,
    "local_address": "127.0.0.1",
    "local_port":8078,
    "password":"gh1Tsy71nw",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open":false
}
$ python3 ./ptproxy.py ptproxy_server.json
{
    "role": "server",
    "state": "./pts_state",
    "local": "127.0.0.1:8077",
    "server": "127.0.0.1:8078",
    "ptexec": "bin/obfs4proxy -logLevel=ERROR -enableLogging=true",
    "ptname": "obfs4",
    "ptargs": "cert=AAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;iat-mode=0",
    "ptserveropt": "",
    "ptproxy": ""
}
$ python3 ./ptproxy.py ptproxy_client.json
{
    "role": "client",
    "state": "./ptc_state",
    "local": "127.0.0.1:8079",
    "server": "127.0.0.1:8078",
    "ptexec": "bin/obfs4proxy -logLevel=ERROR -enableLogging=true",
    "ptname": "obfs4",
    "ptargs": "cert=AAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;iat-mode=0",
    "ptserveropt": "",
    "ptproxy": ""
}
$ sslocal -c shadowsocks_client.json
{
    "server":"127.0.0.1",
    "server_port":8079,
    "local_address": "127.0.0.1",
    "local_port":8080,
    "password":"gh1Tsy71nw",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open":false
}
$ netstat -ptln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:42683         0.0.0.0:*               LISTEN      4528/bin/obfs4proxy 
tcp        0      0 127.0.0.1:8077          0.0.0.0:*               LISTEN      4500/python         
tcp        0      0 127.0.0.1:8078          0.0.0.0:*               LISTEN      4519/bin/obfs4proxy 
tcp        0      0 127.0.0.1:8079          0.0.0.0:*               LISTEN      4526/python3        
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      4533/python

i tried changing shadowsocks server local port to 8080 (browser), 8078 and 8079 but nothing works, i get this kind of errors:

2016/07/23 03:09:05 [NOTICE]: obfs4proxy-0.0.7-dev - launched
2016/07/23 03:10:11 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: read: i/o timeout
2016/07/23 03:10:19 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: read: i/o timeout
2016/07/23 03:10:23 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: read: i/o timeout
2016/07/23 03:10:35 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: read: i/o timeout
2016/07/23 03:10:46 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: EOF
2016/07/23 03:10:46 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: EOF
2016/07/23 03:10:46 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: EOF
2016/07/23 03:10:46 [ERROR]: obfs4([scrubbed]:8078) - outgoing connection failed: EOF

could you help me out? how do you use ptproxy as a browser proxy? thanks!

KexyBiscuit commented 8 years ago

You'll have to change ptargs argument in ptproxy client config file, as once the ptproxy server runs, it prints a cert for you.

g18z0n commented 8 years ago

oh my mistake, it has connected now, though the website detected the proxy anyway...

but thanks @KexyBiscuit