登陆linux vps,搭建jdk环境,安装maven. 然后,
git clone https://github.com/reghao/jproxy jproxy-by-reghao
cd jproxy-by-reghao
root@host jproxy-by-reghao]# grep -rn 0.0.0.0:10011 .
Binary file ./target/classes/cn/reghao/jproxy/http/HttpProxyServer.class matches
./src/main/java/cn/reghao/jproxy/http/HttpProxyServer.java:38: log.info("server start at 0.0.0.0:10011");
[root@host jproxy-by-reghao]# nano ./src/main/java/cn/reghao/jproxy/http/HttpProxyServer.java
(把此 HttpProxyServer.java文件的第38行里的0.0.0.0:10011 改为127.0.0.1:20011 ,把第37行里的10011也改为20011)
mvn package
在当前目录下,会生成target目录。
[root@host jproxy-by-reghao]# ls
dependency-reduced-pom.xml jproxy.iml pom.xml README.md src target
[root@host jproxy-by-reghao]# cd target
[root@host target]# ls
classes jproxy-1.0-SNAPSHOT.jar original-jproxy-1.0-SNAPSHOT.jar
generated-sources maven-archiver
[root@host target]# java -jar jproxy-1.0-SNAPSHOT.jar
会显示:
...
INFO: server start at 127.0.0.1:20011
项目地址:
https://github.com/reghao/jproxy/
https://github.com/reghao/jproxy/issues/1
git clone https://github.com/reghao/jproxy jproxy-by-reghao
cd jproxy-by-reghao
root@host jproxy-by-reghao]# grep -rn 0.0.0.0:10011 .
Binary file ./target/classes/cn/reghao/jproxy/http/HttpProxyServer.class matches
./src/main/java/cn/reghao/jproxy/http/HttpProxyServer.java:38: log.info("server start at 0.0.0.0:10011");
[root@host jproxy-by-reghao]# nano ./src/main/java/cn/reghao/jproxy/http/HttpProxyServer.java
(把此 HttpProxyServer.java文件的第38行里的0.0.0.0:10011 改为127.0.0.1:20011 ,把第37行里的10011也改为20011)
mvn package
在当前目录下,会生成target目录。
[root@host jproxy-by-reghao]# ls
dependency-reduced-pom.xml jproxy.iml pom.xml README.md src target
[root@host jproxy-by-reghao]# cd target
[root@host target]# ls
classes jproxy-1.0-SNAPSHOT.jar original-jproxy-1.0-SNAPSHOT.jar
generated-sources maven-archiver
[root@host target]# java -jar jproxy-1.0-SNAPSHOT.jar
会显示:
...
INFO: server start at 127.0.0.1:20011
项目地址:
https://github.com/reghao/jproxy/
https://github.com/reghao/jproxy/issues/1