请问使用apt-get的时候可以使用代理么?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 131
- 注册时间: 2006-04-07 14:14
- 来自: 北京
- 联系:
请问使用apt-get的时候可以使用代理么?
我发现我使用一些源速度很是问题,我有一个比较好的代理,请问大家有没有遇到类似问题,谢谢了!
- dogfox
- 论坛版主
- 帖子: 5311
- 注册时间: 2006-09-02 14:18
- 来自: 汉桑城
- 联系:
-
- 帖子: 131
- 注册时间: 2006-04-07 14:14
- 来自: 北京
- 联系:
-
- 帖子: 131
- 注册时间: 2006-04-07 14:14
- 来自: 北京
- 联系:
根据我阅读文档的了解,目前apt-get应该还不支持socks代理,不过我用proxychains解决了这个问题
具体的做饭是:
安装proxychains
sudo apt-get install proxychains
配置proxychains
# proxychains.conf VER 2.0
#
# HTTP, SOCKS4, SOCKS5 tunneling proxifier.
#
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# otherwise EINTR is returned to the app
#
# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see chain_len) from the list
# this option is good for scans
#dynamic_chain
#strict_chain
random_chain
# Make sense only if random_chain
chain_len = 1
# Quiet mode (no output)
quiet_mode
# Write stats about good proxies to proxychains.stats
#write_stats
#Some timeouts in milliseconds
#
tcp_read_time_out 15000
tcp_connect_time_out 10000
[ProxyList]
# ProxyList format
# type host port [user pass]
# (values separated by 'tab' or 'blank')
#
#
# Examples:
#
# socks5 192.168.67.78 1080 lamer secret
# http 192.168.89.3 8080 justu hidden
# socks4 192.168.1.49 1080
# http 192.168.39.93 8080
#
#
# proxy types: http, socks4, socks5
# ( auth types supported: "basic"-http "user/pass"-socks )
#
#socks5 192.168.1.4 1080
#socks4 10.5.81.143 1080
#http 192.168.203.18 8080
socks5 some_ip 1080
然后在需要使用代理的时候
sudo proxychains apt-get install doxygen doxygen-doc doxygen-gui graphviz
具体的做饭是:
安装proxychains
sudo apt-get install proxychains
配置proxychains
# proxychains.conf VER 2.0
#
# HTTP, SOCKS4, SOCKS5 tunneling proxifier.
#
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# otherwise EINTR is returned to the app
#
# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see chain_len) from the list
# this option is good for scans
#dynamic_chain
#strict_chain
random_chain
# Make sense only if random_chain
chain_len = 1
# Quiet mode (no output)
quiet_mode
# Write stats about good proxies to proxychains.stats
#write_stats
#Some timeouts in milliseconds
#
tcp_read_time_out 15000
tcp_connect_time_out 10000
[ProxyList]
# ProxyList format
# type host port [user pass]
# (values separated by 'tab' or 'blank')
#
#
# Examples:
#
# socks5 192.168.67.78 1080 lamer secret
# http 192.168.89.3 8080 justu hidden
# socks4 192.168.1.49 1080
# http 192.168.39.93 8080
#
#
# proxy types: http, socks4, socks5
# ( auth types supported: "basic"-http "user/pass"-socks )
#
#socks5 192.168.1.4 1080
#socks4 10.5.81.143 1080
#http 192.168.203.18 8080
socks5 some_ip 1080
然后在需要使用代理的时候
sudo proxychains apt-get install doxygen doxygen-doc doxygen-gui graphviz
gman3025 写了:嗯,应该可以的,不过我没试过,HTTP代理已经很快了