shmilylty / OneForAll

OneForAll是一款功能强大的子域收集工具
GNU General Public License v3.0
8.09k stars 1.28k forks source link

V0.4.3代理功能无法正常使用 #192

Closed superboy-zjc closed 3 years ago

superboy-zjc commented 3 years ago

是否使用了最新代码

Bug描述 使用了代理池功能,发现代理服务器日志报有编码错误。

运行环境

如何复现 代理配置: enable_request_proxy = True # 是否使用代理(全局开关) proxy_all_module = True # 代理所有模块 proxy_partial_module = ['GoogleQuery', 'AskSearch', 'DuckDuckGoSearch', 'GoogleAPISearch', 'GoogleSearch', 'YahooSearch', 'YandexSearch', 'CrossDomainXml', 'ContentSecurityPolicy'] # 代理自定义的模块 request_proxy_pool = [{'http': 'http://127.0.0.1:10809', 'https': 'https://127.0.0.1:10809'}] # 代理池 正常执行代码 python3.8 oneforall.py --target domain.com run

复现命令(必写) python3.8 oneforall.py --target domain.com run 报错文本 oneforall报错: image 一部分代理服务器报错: 2021/03/02 09:28:17 [Warning] [401364332] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x18\xc7\xe2X\xbd\x8c\x16\xc3f\xa7\xcd\b\xda\xda\"V\xf4\xc7x\xdd)Q6kv)ј\r\xcf\xc7\b \x13F\x10\xc3\xfc&\xf0l\xcf:\x93\xda\xe5Q.\xb8\x02\x06\xb0Wˍ\xd8$\x12\x84\x1d\xc1L+Q\xe6\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:17 [Warning] [595362850] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > invalid method "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x14\xa5\xdfa\xaa\x95\xbb\xd2\xf6\xfbn\xb7[\xe2s2YHA#}\x9bܬ\x13APi\xf6\a\xfa" 2021/03/02 09:28:17 [Warning] [2290092744] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > invalid method "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x8f\x02\xd3xu\x95e\x98z\xaf\xb4\x02" 2021/03/02 09:28:17 [Warning] [1992754812] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03Di,Gե\xa2N\x14\x86\x93L\xe6\\xd7VO[%\xf1kTk\x8caH-\x8b\x9b\x9e|\x04 K\xba\xa6W\xc8\xf6\xe3:3E)\xb6\x90\x1c" 2021/03/02 09:28:17 [Warning] [1794122467] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03/\x1bCq\x8e\x9b\xd1\xfe\x9e\x80\xf3\x0f0,\xe3ק\xe2\x1b\xcf\xca\xdeU\x95|\x1b\xef]\x13\xe6\xfe# \xd1\xc7Oj\xbb1\x95<\xed?%\x89\x95\xa1\x82\xa2\xcbO\x1fQU\xfc\x93\x03H\x15P\x172\xbe\xc4\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:17 [Warning] [3321863911] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03ۜ\xf5\x96Qy\xa24\x12i\xe6,\x9a<yQ\x125\x0et\xee\xf4\xb6D5̟<\xe2e\vU \xc1\x05t\x01lQ\xbaI\x16\a\xa5\xc5)/\xf2\xf1\xca!\a\xdf\xe7\xf83\x16C\x87@Q˗\xeb\x15\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:17 [Warning] [2787648456] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x97\x01\xffv\xcdJ;eȻٵ|#T\xf6\xf0\xb3\x03\x9dd\xca\xd0Gmm\xd1\xd1E\x11\x97\xcb o>\x16\x94" 2021/03/02 09:28:17 [Warning] [2939159090] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03T'\xe2$]\x8bũ6Y\xbf>" 2021/03/02 09:28:17 [Warning] [3938218050] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03<\x12y\xa3\xc8\xf4\xef\x12\xe0\x18C\x8a\xff\x1d\a\xfaس\xb6\x96\x88\xdb\xfc\xce^ǣ\x1dP\x85\xce\xd3 O\xab\xf2\xe0\x82[\x9aa\x91\xd9<\x15\xe1账!\x9d\x87\x11X\x11\xe1J\xf1\x93g2\xc1\xba\xea\xde\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:17 [Warning] [608503478] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > invalid method "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\xcfX\xf2\x832\x9bM4\bꥆx&\x13R\x9c\x1a\x18j\xf2\xd3\xe0\x83" 2021/03/02 09:28:17 [Warning] [1240570762] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x86b\xc9\xe4\x18\x01\xa2\xab\x93\x05\xe2\xd6t\x02\x0f\x00\xeeTRs\xec\xec'\x88?\xf6\xf1\xed,\xbf\x1b \x14\x1b֓e\xd5\xc0Ŷ\x85\xaf\x94\xa3\a\xaa\u0557\x84\xa8WȽ%\x0fZ\xabx\xff\xb0\xe6\xbc\x16\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:18 [Warning] [2104010657] v2ray.com/core/proxy/http: failed to read response from bankofjiaxing.com.cn > io: read/write on closed pipe 2021/03/02 09:28:18 [Warning] [2072037169] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x8al{t\xc0\x00\xa1\t_\xfa\x97\x80\xdb+q6M\x95\xe98jQ\xf5\xd63\x8c\xec\xdd\xd3!\x1a \x92\xf2\x8f\xe8\x81\xf7\x82\u05f9%ӟw\xfe\x10|\xd09C1\xe4\xe8\fuȲ\x05ڪ\x1a\xdc\x0f\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:18 [Warning] [2616710880] v2ray.com/core/proxy/http: failed to read response from bankofjiaxing.com.cn > io: read/write on closed pipe 2021/03/02 09:28:18 [Warning] [2490481877] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x19M\x00\xbb\x1c]C\"aL\x999z|\xbf\xf5\"\x15L\x0f\x0eC\xf9s\fiٵ\xf1\x95\xe7\xee ZaL\xa3\xae\xbf_EevA2\xfb\xbc\x16\"ӊ\xe8#\xa7\xbf\a\xf8w=\xf6\xda\xee\x1a\x1fH\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" 2021/03/02 09:28:18 [Warning] [1338908625] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: failed to read http request > malformed HTTP request "\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\xde\xf1\xe2\xf4\x8f\x11\xa3<\xa6\xb4p\r\x17D\xd4\x11X\x96\xa2\xe9\x97Vم[\xdc\xd8]*ʸR Y\xc0\xf9J\xa6\r\xb9V\xb9\xe9\xd9\xf5\xd9\xf3\xfd-M\ao\xa4\x1er\x10Jg\xf1\x91\x01\xe6\xe9'i\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/̨̩\x00\x9f\x00\x9e̪\xc0\xaf\xc0\xad\xc0\xae\xc0\xac\xc0$\xc0(\xc0#\xc0'\xc0" image

预期结果 google等模块通过代理进行HTTP请求,不会出现报错。

实际结果 模块流量走代理,但是出现了相关编码问题。

shmilylty commented 3 years ago

尝试克隆仓库最新的代码试一试呢。

shmilylty commented 3 years ago

该问题先关闭,有问题再打开。