Total Pageviews

Thursday, 11 August 2016

一个基于java的http代理服务器程序:java-http-proxy

先安装ant:
wget http://apache.mirrors.tds.net//ant/binaries/apache-ant-1.9.7-bin.tar.gz
tar zxvf apache-ant-1.9.7-bin.tar.gz
cd apache-ant-1.9.7
root@AR:~/apache-ant-1.9.7# ls
bin   etc       INSTALL  LICENSE patch.xml
CONTRIBUTORS   fetch.xml   KEYS     manual README
contributors.xml  get-m2.xml  lib      NOTICE WHATSNEW
root@AR:~/apache-ant-1.9.7# cd bin
root@AR:~/apache-ant-1.9.7/bin# ls
ant antenv.cmd  antRun.pl   lcp.bat    runrc.cmd
ant.bat  antRun      complete-ant-cmd.pl  runant.pl
ant.cmd  antRun.bat  envset.cmd   runant.py

root@AR:~/apache-ant-1.9.7/bin# echo 'export PATH=$PATH:/root/apache-ant-1.9.7/bin' >> /etc/profile
root@AR:~/apache-ant-1.9.7/bin# . /etc/profile
这样,ant就装好了。

git clone https://phabricator.chromabits.com/diffusion/JHP/java-http-proxy.git
cd java-http-proxy

root@AR:~/java-http-proxy# ls
build   dist  manifest.mf  nbproject  Readme.md~
build.xml  lib nbbuild.xml  Readme.md  src
root@AR:~/java-http-proxy# ls build
classes       ProxyClientRunnable.class  WebProxy.class
ProxyClientHostRunnable.class  ProxyRunnable.class
root@AR:~/java-http-proxy# ant build

运行:java WebProxy -p port_number

项目地址:https://phabricator.chromabits.com/diffusion/JHP/