gumblex / ptproxy

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

failed to connect to ORPort: dial: connection refued #3

Closed biaocy closed 9 years ago

biaocy commented 9 years ago

Hi, gumblex. First of all, thank you for the creation of the project. When I use this project, encountered the following issues, can you help me look at it?

2015/09/01 10:11:44 [NOTICE]: obfs4proxy-0.0.6-dev - launched
2015/09/01 10:13:07 [ERROR]: obfs4([scrubbed]:35534) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:09 [ERROR]: obfs4([scrubbed]:35538) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:11 [ERROR]: obfs4([scrubbed]:35548) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:11 [ERROR]: obfs4([scrubbed]:35552) - failed to connect to ORPort: dial: connection refused
biaocy commented 9 years ago

Sorry, I was wrong place...

gumblex commented 9 years ago

Is that a config error?

biaocy commented 9 years ago

@gumblex I'm not sure, I think I posted wrong place? I reposted to here

gumblex commented 9 years ago

Obfs4 is probably not responsible for this. Please post your config file here. (Remove your private IP address and obfs4 certificate.)

biaocy commented 9 years ago

Below is my server config:

{
    "role": "server",
    "ptexec": "obfs4proxy -logLevel=ERROR -enableLogging=true",
    "ptname": "obfs4",
    "ptproxy": "",
    "ptserveropt": "",
    "state": "/tmp/PT/"
}
biaocy commented 9 years ago

I have read the source code, and found the error was throw from here But I don't know what ORPort is used for.

gumblex commented 9 years ago

I meant your public IP address, but it didn't matter... I think there isn't a server listening on the "local" address. This script and obfs4 tunnel raw TCP stream, so you must have a real application server (HTTP server, SSH, SOCKS server, etc.) to make it work. Think it as obfuscated port forwarding.

biaocy commented 9 years ago

I found your profile location is Shanghai, China. Can you read chinese? I use shadowsocks as a application server and listening "local" port 1080, and ptproxy's local address is 127.0.0.1:1080, is this wrong?

gumblex commented 9 years ago

没错。ORPort 就是服务端的 "local" 地址(ptproxy.py 99 行),obfs4 说没法连接。

biaocy commented 9 years ago

你的意思是,问题出在服务端的obfs4 和 shadowsocks之间?obfs4无法连接服务端的shadowsocks监听端口?iptables 的FORWARD policy,我默认DROP了,会和这个有关吗?VPS上的服务器被我删了。。。

biaocy commented 9 years ago

不早了,我明晚再尝试一下,谢谢你的帮助。

gumblex commented 9 years ago

无法连接,可能和防火墙有关。服务端的 ptproxy 没做什么网络连接方面的事情。

biaocy commented 9 years ago

不好意思,是ss配置错了,将服务端ss的server/port配置成监听服务器的obf4 forward的端口才对,谢谢你的帮助。