gumblex / ptproxy

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

ptargs iat-mode wont change even I set iat-mode=1 in json file #9

Closed saltydizz closed 8 years ago

saltydizz commented 8 years ago

i set

{
   ... 
    "ptargs": "cert=AAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;iat-mode=1",
    ...
}

but when I run: python3 ptproxy.py -s server.json

===== Server information =====
"server": "[::]:5899",
"ptname": "obfs4",
"ptargs":              "cert=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;iat-mode=0",
==============================
2016-05-10 10:15:16 PT started successfully.

(I hide the cert string for security) p.s. I installed obfs4 as: go get git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy and when i run it i found that its version is 0.0.7, will it be the problem?

gumblex commented 8 years ago

"ptargs" on server mode is ignored. This "Server information" is intended to be filled in the client config.

targetnull commented 8 years ago

@gumblex so it means that the client could specify the cert arbitrarily? But when I use different cert, it wouldn't succeed. Also, could you give a more specific description on how to use SOCKS5 ? I replace the local with socks5 on server, however, the client doesn't accept the socks5 content for local, is there a solution?

Thanks

gumblex commented 8 years ago

@targetnull No. The client must specify the same cert as printed on the server side. The client is not aware of what inner protocol is being used. local is for listening port. You should set your applications (eg. browsers) connect through the SOCKS5 server at local address.

targetnull commented 8 years ago

Thanks for your reply. I'm wondering how the server generate the cert, is there a private key embeded in your script?

gumblex commented 8 years ago

The obfs4 private key is stored in obfs4_state.json. If it doesn't exist, obfs4 will generate a random new key.

targetnull commented 8 years ago

Thanks, I see.