Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议改进二级代理格式和tunnelAllowedPort #109

Open
stscor opened this issue Dec 31, 2013 · 5 comments
Open

建议改进二级代理格式和tunnelAllowedPort #109

stscor opened this issue Dec 31, 2013 · 5 comments

Comments

@stscor
Copy link

stscor commented Dec 31, 2013

proxy = protocol://[authinfo@]server:port
如果authinfo的密码中含有@,则软件报错

另外建议tunnelAllowedPort可以像squid一样指定范围

@cyfdecyf
Copy link
Owner

密码中别用 @,替换成其他字符。

在什么应用中需要指定大段的 port?

@stscor
Copy link
Author

stscor commented Dec 31, 2013

代理ftp时被动模式不能打开端口,提前是登录端口已经加入tunnelallowedport,并且登录没问题
是否为未开放端口原因

@cyfdecyf
Copy link
Owner

cow 不支持 ftp。

@stscor
Copy link
Author

stscor commented Jan 2, 2014

如果是用HTTP隧道就可以代理FTP

比如我下面的日志,就是在COW打开了端口的情况下代理成功的
状态: 通过代理连接到 185.28.x.x
状态: 正在连接 127.0.0.1:8081... //COW的本地端口
状态: 与代理连接建立,进行握手...
响应: 代理回复: HTTP/1.1 200 Tunnel established
状态: 连接建立,等待欢迎消息...
响应: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
响应: 220-You are user number 44 of 500 allowed.
命令: USER x
响应: 331 User x OK. Password required
命令: PASS ***********
响应: 230 OK. Current directory is /public_html
命令: OPTS UTF8 ON
响应: 200 OK, UTF-8 enabled
状态: 已连接
状态: 读取目录列表...
命令: PWD
响应: 257 "/public_html" is your current location
命令: TYPE I
响应: 200 TYPE is now 8-bit binary
命令: PASV
响应: 227 Entering Passive Mode (185,28,x,x,115,107) //这个端口已经加入到tunnelAllowedPort里
命令: MLSD
状态: 正在连接 127.0.0.1:8081...
状态: 与代理连接建立,进行握手...
响应: 代理回复: HTTP/1.1 200 Tunnel established
响应: 150 Accepted data connection
响应: 226-Options: -a -l
响应: 226 9 matches total
状态: 列出目录成功
状态: 通过代理连接到 185.28.x.x
状态: 正在连接 127.0.0.1:8081...
状态: 与代理连接建立,进行握手...
响应: 代理回复: HTTP/1.1 200 Tunnel established
状态: 连接建立,等待欢迎消息...
响应: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
响应: 220-You are user number 42 of 500 allowed.
命令: USER x
响应: 331 User x OK. Password required
命令: PASS ***********
响应: 230 OK. Current directory is /public_html
命令: OPTS UTF8 ON
响应: 200 OK, UTF-8 enabled
状态: 已连接
状态: 开始上传 update
命令: CWD /public_html
响应: 250 OK. Current directory is /public_html
命令: PWD
响应: 257 "/public_html" is your current location
命令: TYPE I
响应: 200 TYPE is now 8-bit binary
命令: PASV
响应: 227 Entering Passive Mode (185,28,x,x,114,145) //这个端口已经加入到tunnelAllowedPort里
命令: STOR update
状态: 正在连接 127.0.0.1:8081...
状态: 与代理连接建立,进行握手...
响应: 代理回复: HTTP/1.1 200 Tunnel established
响应: 150 Accepted data connection
响应: 226-File successfully transferred
响应: 226 0.685 seconds (measured here), 30.16 Kbytes per second
状态: 文件传输成功,传输了 21,146 字节 (用时2 秒)

所以还是希望能加入范围端口

@cyfdecyf
Copy link
Owner

cyfdecyf commented Jan 4, 2014

后面的版本会考虑支持这样的语法,不过短期内不会有下一个版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants