Python proxy.py 出现错误,求解决

前几天还好好的昨天就出现错误,goagent 的 proxy.py 我没有改过,问题如下 – 附图
ymc@Bruce:~/.g/local> python proxy.py
Traceback (most recent call last):
File “proxy.py”, line 1583, in
common = Common()
File “proxy.py”, line 1484, in init
self.PROXY_PORT = int(proxyport)
ValueError: invalid literal for int() with base 10: '
ymc@Bruce:~/.g/local>

!](http://imgsrc.baidu.com/forum/pic/item/99c76df40ad162d969eb8ff113dfa9ec8b13cd22.jpg)

升级到最新

看起来是你的端口配置有问题啊,估计包含非数字字符吧,把 proxy.ini 贴出来看看呢?

[listen]
ip = 127.0.0.1
port = 8087
visible = 1
debuginfo = 0

[gae]
appid = c2013hao|chao2013ming|min2013g|mingchaoyang2013|y2013ang|yang2013chao|yangchaomingguoruijuan|yangmingchaoguoruijuan
password =
path = /2
mode = https
profile = ipv4
window = 4
obfuscate = 0
validate = 0
options =

[iplist]
google_cn = 203.208.46.131|203.208.46.132|203.208.46.133|203.208.46.134|203.208.46.135|203.208.46.136|203.208.46.137|203.208.46.138
google_hk = google.com|mail.google.com|www.google.com.hk|www.google.com.tw|www.l.google.com
google_ipv6 = 2404:6800:4005:c00::64|2404:6800:4005:c00::65|2404:6800:4005:c00::5e|2404:6800:4005:c00::67|2404:6800:4005:c00::2f
;google_tw = google.com.tw|www.google.com.sg|www.google.co.jp|www.google.sg|www.google.cat|mail.google.com|mail.l.google.com

[ipv4/hosts]
s0.googleusercontent.com = google_hk
s1.googleusercontent.com = google_hk
s2.googleusercontent.com = google_hk
s3.googleusercontent.com = google_hk
s4.googleusercontent.com = google_hk
s5.googleusercontent.com = google_hk
s6.googleusercontent.com = google_hk
gp0.googleusercontent.com = google_hk
gp1.googleusercontent.com = google_hk
gp2.googleusercontent.com = google_hk
gp3.googleusercontent.com = google_hk
gp4.googleusercontent.com = google_hk
gp5.googleusercontent.com = google_hk
gp6.googleusercontent.com = google_hk
themes.googleusercontent.com = google_hk
producer.googleusercontent.com = google_hk
mail-attachment.googleusercontent.com = google_cn
code.google.com = google_hk
upload.youtube.com = google_hk
talk.google.com =
talk.l.google.com =
talkx.l.google.com =
.google.com = google_hk
.google.com.hk = google_hk
.googleapis.com = google_hk
.android.com = google_hk
.appspot.com = google_hk
.googlegroups.com = google_hk
.googlesource.com = google_hk
.googleusercontent.com = google_cn
.google-analytics.com = google_cn
.googlecode.com = google_cn
.gstatic.com = google_cn
.dropbox.com:443 =
.box.com:443 =
.copy.com:443 =
; https?://www.youtube.com/watch? = google_hk
; https?://.+.youtube.com/upload = google_hk
; https?://.+.youtube.com/.*yt_live = google_hk
; https?://.+.c.youtube.com/.*yt_live = google_hk
; https?://.+.c.youtube.com/liveplay = google_hk
; https?://.+.youtube.com/live = google_hk
; https?://www.example.com/.+.html = file:///C:/README.txt

[ipv4/http]
crlfsites = youtube.com|.google.com|.googlecode.com
withgae = play.google.com|wenda.google.com.hk
forcehttps = google.com|www.google.com.hk|code.google.com|groups.google.com|docs.google.com|s1.googleusercontent.com|s2.googleusercontent.com|images1-focus-opensocial.googleusercontent.com|images2-focus-opensocial.googleusercontent.com|images3-focus-opensocial.googleusercontent.com|lh0.googleusercontent.com|lh1.googleusercontent.com|lh2.googleusercontent.com|lh3.googleusercontent.com|lh4.googleusercontent.com|lh5.googleusercontent.com|lh6.googleusercontent.com|lh7.googleusercontent.com|lh8.googleusercontent.com|lh9.googleusercontent.com|lh10.googleusercontent.com|lh11.googleusercontent.com|lh12.googleusercontent.com
fakehttps = ssl.gstatic.com|mail-attachment.googleusercontent.com|webcache.googleusercontent.com|s1.googleusercontent.com|s2.googleusercontent.com|images1-focus-opensocial.googleusercontent.com|images2-focus-opensocial.googleusercontent.com|images3-focus-opensocial.googleusercontent.com|lh0.googleusercontent.com|lh1.googleusercontent.com|lh2.googleusercontent.com|lh3.googleusercontent.com|lh4.googleusercontent.com|lh5.googleusercontent.com|lh6.googleusercontent.com|lh7.googleusercontent.com|lh8.googleusercontent.com|lh9.googleusercontent.com|lh10.googleusercontent.com|lh11.googleusercontent.com|lh12.googleusercontent.com

[ipv6/hosts]
talk.google.com =
talk.l.google.com =
talkx.l.google.com =
.google.com = google_ipv6
.googleusercontent.com = google_ipv6
.googleapis.com = google_ipv6
.google-analytics.com = google_ipv6
.googlecode.com = google_ipv6
.google.com.hk = google_ipv6
.googlegroups.com = google_ipv6
.googlesource.com = google_ipv6
.appspot.com = google_ipv6
.android.com = google_ipv6
.dropbox.com:443 =
.box.com:443 =
.copy.com:443 =
; https?://www.youtube.com/watch = google_hk
; https?://.+.youtube.com/.*yt_live = google_hk
; https?://.+.c.youtube.com/.*yt_live = google_hk
; https?://.+.c.youtube.com/liveplay = google_hk
; https?://.+.youtube.com/live = google_hk
; https?://.+.youtube.com/upload = google_hk
; upload.youtube.com = google_hk

[ipv6/http]
dns = 2001:4860:4860::8888|2001:4860:4860::8844|2001:470:20::2
crlfsites = .youtube.com|.google.com
withgae = play.google.com
forcehttps = code.google.com|groups.google.com|docs.google.com
fakehttps =

[pac]
enable = 1
ip = 127.0.0.1
port = 8086
file = proxy.pac
gfwlist = autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
adblock = github.com/chinalist/chinalist/raw/master/adblock.txt
expired = 86400

[php]
enable = 0
password = 123456
crlf = 0
validate = 0
listen = 127.0.0.1:8088
fetchserver = .com/
usehosts = 1

[proxy]
enable = 0
autodetect = 1
host = 10.64.1.63
port = 8080
username =
password =

[autorange]
hosts = .c.youtube.com|.atm.youku.com|.googlevideo.com|av.vimeo.com|smile-.nicovideo.jp|video..fbcdn.net|s*.last.fm|x*.last.fm|.x.xvideos.com|.edgecastcdn.net|.d.rncdn3.com|cdn.public.tube8.com|videos.flv*.redtubefiles.com|cdn*.public.extremetube.phncdn.com|cdn*.video.pornhub.phncdn.com|.mms.vlog.xuite.net|vs.thisav.com|archive.rthk.hk|video*.modimovie.com|*.c.docs.google.com
endswith = .iso|.dmg
noendswith = .xml|.json|.html|.php|.py|.js|.css|.jpg|.jpeg|.png|.gif|.ico|.webp
threads = 3
maxsize = 1048576
waitsize = 524288
bufsize = 8192

[dns]
enable = 0
listen = 127.0.0.1:53
servers = 8.8.8.8|8.8.4.4|223.6.6.6|114.114.115.115
blacklist = 1.1.1.1|255.255.255.255|74.125.127.102|74.125.155.102|74.125.39.102|74.125.39.113|209.85.229.138|4.36.66.178|8.7.198.45|37.61.54.158|46.82.174.68|59.24.3.173|64.33.88.161|64.33.99.47|64.66.163.251|65.104.202.252|65.160.219.113|66.45.252.237|72.14.205.104|72.14.205.99|78.16.49.15|93.46.8.89|128.121.126.139|159.106.121.75|169.132.13.103|192.67.198.6|202.106.1.2|202.181.7.85|203.161.230.171|203.98.7.65|207.12.88.98|208.56.31.43|209.145.54.50|209.220.30.174|209.36.73.33|209.85.229.138|211.94.66.147|213.169.251.35|216.221.188.182|216.234.179.13|243.185.187.3|243.185.187.39

[useragent]
enable = 0
string = Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

[fetchmax]
local =
server =

[love]
enable = 1
tip = u8bf7u5173u6ce8u5317u4eacu5931u5b66u513fu7ae5~~

好想我改过一个端口。不知道改的哪了。

这是目前源里面最新的啊。

1, 运行下 python,看你的 python 版本是多少
2,检查你的 proxy.ini, 看回车换行符还是 unix 的吗
3,尝试把 port=8087 等号两边的空格去掉。

我把 proxy.ini 和 proxy.py 这两个文件上传了我的 python 版本是 Python 2.7.6 哪位好心的帅哥美女帮忙试着在自己的终端运行一下看是否也出现问题行吗 pan.baidu.com/s/1mgJp2kC

第二个不会,第三个试了也没有用 Python 2.7.6 谢谢

Python 2.7.6 官方源里面最新的呢

g0agen-t 最新是3.18-1,你的是3.16,配置文件和代码都有调整,去gayhub镜像下个新版,重新配置