Total Pageviews

Friday 30 December 2016

由socks proxy生成http proxy的工具:FWLite-cli(类似cow)

在mac/windows上,

git clone https://github.com/v3aqb/fwlite-cli

cd fwlite-cli

sudo python3 setup.py install

显示:

Password:

running install

running bdist_egg

running egg_info

writing fwlite_cli.egg-info/PKG-INFO

writing dependency_links to fwlite_cli.egg-info/dependency_links.txt

writing entry points to fwlite_cli.egg-info/entry_points.txt

writing requirements to fwlite_cli.egg-info/requires.txt

writing top-level names to fwlite_cli.egg-info/top_level.txt

reading manifest file 'fwlite_cli.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no files found matching 'config/delegated-apnic-latest.ini'

warning: no files found matching 'config/gfwlist.ini'

writing manifest file 'fwlite_cli.egg-info/SOURCES.txt'

installing library code to build/bdist.macosx-10.12-x86_64/egg

running install_lib

running build_py

creating build/bdist.macosx-10.12-x86_64/egg

creating build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/__init__.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/__main__.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/apfilter.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/base_handler.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/config.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/connection.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/get_proxy.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/httputil.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/hxsocks2.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/parent_proxy.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/plugin_manager.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/port_forward.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/proxy_handler.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/redirector.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/resolver.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/ssocks.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

copying build/lib/fwlite_cli/util.py -> build/bdist.macosx-10.12-x86_64/egg/fwlite_cli

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/__init__.py to __init__.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/__main__.py to __main__.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/apfilter.py to apfilter.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/base_handler.py to base_handler.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/config.py to config.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/connection.py to connection.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/get_proxy.py to get_proxy.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/httputil.py to httputil.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/hxsocks2.py to hxsocks2.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/parent_proxy.py to parent_proxy.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/plugin_manager.py to plugin_manager.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/port_forward.py to port_forward.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/proxy_handler.py to proxy_handler.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/redirector.py to redirector.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/resolver.py to resolver.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/ssocks.py to ssocks.cpython-38.pyc

byte-compiling build/bdist.macosx-10.12-x86_64/egg/fwlite_cli/util.py to util.cpython-38.pyc

creating build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/PKG-INFO -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/SOURCES.txt -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/dependency_links.txt -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/entry_points.txt -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/requires.txt -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

copying fwlite_cli.egg-info/top_level.txt -> build/bdist.macosx-10.12-x86_64/egg/EGG-INFO

zip_safe flag not set; analyzing archive contents...

creating 'dist/fwlite_cli-0.3-py3.8.egg' and adding 'build/bdist.macosx-10.12-x86_64/egg' to it

removing 'build/bdist.macosx-10.12-x86_64/egg' (and everything under it)

Processing fwlite_cli-0.3-py3.8.egg

Removing /usr/local/lib/python3.8/site-packages/fwlite_cli-0.3-py3.8.egg

Copying fwlite_cli-0.3-py3.8.egg to /usr/local/lib/python3.8/site-packages

Adding fwlite-cli 0.3 to easy-install.pth file

Installing fwlite-cli script to /usr/local/bin


Installed /usr/local/lib/python3.8/site-packages/fwlite_cli-0.3-py3.8.egg

Processing dependencies for fwlite-cli==0.3

Searching for repoze.lru

Reading https://pypi.org/simple/repoze.lru/

Downloading https://files.pythonhosted.org/packages/b0/30/6cc0c95f0b59ad4b3b9163bff7cdcf793cc96fac64cf398ff26271f5cf5e/repoze.lru-0.7-py3-none-any.whl#sha256=f77bf0e1096ea445beadd35f3479c5cff2aa1efe604a133e67150bc8630a62ea

Best match: repoze.lru 0.7

Processing repoze.lru-0.7-py3-none-any.whl

Installing repoze.lru-0.7-py3-none-any.whl to /usr/local/lib/python3.8/site-packages

Adding repoze.lru 0.7 to easy-install.pth file


Installed /usr/local/lib/python3.8/site-packages/repoze.lru-0.7-py3.8.egg

Searching for hxcrypto

Downloading https://github.com/v3aqb/hxcrypto/archive/master.zip#egg=hxcrypto-0.0.3


error: Download error for https://github.com/v3aqb/hxcrypto/archive/master.zip#egg=hxcrypto-0.0.3: [Errno 60] Operation timed out


解决办法:

cd ~

git clone https://github.com/v3aqb/hxcrypto

cd hxcrypto

sudo python3 setup.py install


cd ~/fwlite-cli

nano config/config.ini

(启用proxy3 = socks5://127.0.0.1:1080

fwlite-cli -c config/config.ini


这样,就由socks5://127.0.0.1:1080生成了一个http proxy,地址为http://127.0.0.1:8118然后,Set browser's proxy setting to http proxy, 地址为127.0.0.1 ,端口为8118 ,浏览器即可翻墙。


项目地址:https://github.com/v3aqb/fwlite-cli

https://github.com/v3aqb/fwlite