如何为lftp设置代理
-
- 帖子: 132
- 注册时间: 2007-06-30 20:33
自己看/etc/lftp.conf,里面就有:
## Proxy can help to pass a firewall
## Environment variables ftp_proxy, http_proxy and no_proxy are used to
## initialize the below variables automatically. You can set them here too.
##
## ftp:proxy must communicate with client over ftp protocol, squid won't do.
## This can be e.g. TIS-FWTK or rftpd. User and password are optional.
# set ftp:proxy ftp://[user:pass@]your_ftp_proxy:port
## ...but squid still can be used to access ftp servers, using hftp protocol:
# set ftp:proxy http://your.squid.address:port
## ...if squid allows CONNECT to arbitrary ports, then you can use CONNECT
## instead of hftp:
# set ftp:use-hftp no
##
## no proxy for host
# set ftp:proxy/local_host ""
## or domain
# set ftp:proxy/*.domain.com ...
##
## http:proxy must communicate with client over http protocol, e.g. squid.
## Default port is 3128.
# set http:proxy your_http_proxy[:port]
## hftp:proxy must also be an http proxy. It is used for FTP over HTTP access.
# set hftp:proxy your_http_proxy[:port]
##
## net:no-proxy disables proxy usage for list of domains.
# set net:no-proxy .domain.com,.otherdom.net
## If you don't have direct ftp access, this setting can be useful to select
## hftp instead of ftp automatically.
# set ftp:proxy http://your.http.proxy:port
需要注意的是如果你用的是hftp:proxy proxyserver设置,连接时要用
lftp hftp://server
如果用的是ftp:proxy http://proxyserver的话就可以不用加hftp,默认ftp就从http proxy走了。
用http代理的话不是很建议用lftp,因为这时lftp的一些功能都没用了,如补全,高亮之类的,看起来就像是在浏览器里打开ftpserver一样,不知道是不是我没设好还是怎样。
## Proxy can help to pass a firewall
## Environment variables ftp_proxy, http_proxy and no_proxy are used to
## initialize the below variables automatically. You can set them here too.
##
## ftp:proxy must communicate with client over ftp protocol, squid won't do.
## This can be e.g. TIS-FWTK or rftpd. User and password are optional.
# set ftp:proxy ftp://[user:pass@]your_ftp_proxy:port
## ...but squid still can be used to access ftp servers, using hftp protocol:
# set ftp:proxy http://your.squid.address:port
## ...if squid allows CONNECT to arbitrary ports, then you can use CONNECT
## instead of hftp:
# set ftp:use-hftp no
##
## no proxy for host
# set ftp:proxy/local_host ""
## or domain
# set ftp:proxy/*.domain.com ...
##
## http:proxy must communicate with client over http protocol, e.g. squid.
## Default port is 3128.
# set http:proxy your_http_proxy[:port]
## hftp:proxy must also be an http proxy. It is used for FTP over HTTP access.
# set hftp:proxy your_http_proxy[:port]
##
## net:no-proxy disables proxy usage for list of domains.
# set net:no-proxy .domain.com,.otherdom.net
## If you don't have direct ftp access, this setting can be useful to select
## hftp instead of ftp automatically.
# set ftp:proxy http://your.http.proxy:port
需要注意的是如果你用的是hftp:proxy proxyserver设置,连接时要用
lftp hftp://server
如果用的是ftp:proxy http://proxyserver的话就可以不用加hftp,默认ftp就从http proxy走了。
用http代理的话不是很建议用lftp,因为这时lftp的一些功能都没用了,如补全,高亮之类的,看起来就像是在浏览器里打开ftpserver一样,不知道是不是我没设好还是怎样。