Skip to content

Commit 3e31346

Browse files
committed
update
1 parent bb8154a commit 3e31346

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,30 @@
2020
- 这种代理只能代理http/https连接,当然curl应该是支持ftp的,不过CONNECT请求信息中,我们并不能知道接下来要走什么协议,默认是处理成https了
2121
- 这个简单的XOR加密是真的不错,虽然不能保证数据安全,但是放到有广告的php免费空间中,乱码中主机商不知道怎么插入广告了。。。具有广告过滤的功能了,哈哈哈
2222

23+
### 使用
24+
1.把CA.crt CA证书导入到系统中
25+
2.把index.php上传到一个(免费的)php空间中,位置名称随意,记下php文件的网络地址(这里最好用一个CDN加速,例如cloudflare,因为免费空间基本速度不快)
26+
3.在右侧release下载对应平台的可执行文件(这里也可以自己根据go文件生成)
27+
4.cmd命令窗口/linux终端执行php-proxy -s php文件的网络地址,这时本地127.0.0.1:8081就是一个http proxy
28+
```
29+
php-proxy.exe -s https://xxx.xx/free/index.php -l 127.0.0.1:8080 #windows监听127.0.0.1:8080,
30+
php-proxy -s https://xxxx.xx/proxy/index.php #php 地址https://xxx.xx/free/index.php,linux默认监听127.0.0.1:8081
31+
```
32+
5.设置浏览器的http proxy地址127.0.0.1:8081
33+
6.在浏览器中输入你想浏览的网页...
34+
7.更多使用详情可以执行php-proxy -h获取
35+
```
36+
-d enable debug mode for debug
37+
-l string
38+
Local listen address(HTTP Proxy address) (default "127.0.0.1:8081")
39+
-p string
40+
php server password (default "123456")
41+
-s string
42+
php fetchserver path(http/https) (default "https://a.bc.com/php-proxy/index.php")
43+
-sni string
44+
HTTPS sni extension ServerName(default fetchserver hostname)
45+
```
46+
2347
### TODO
2448
- 增加请求头添加的配置,也许可以用来放到国内外(免费)的php空间,做免流代理
2549
- 防止中间人攻击,对服务器进行认证

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type config struct {
8181

8282
func (c *config) init_config() {
8383
//
84-
flag.StringVar(&c.listen, "l", "127.0.0.1:8081", "Local listen address")
84+
flag.StringVar(&c.listen, "l", "127.0.0.1:8081", "Local listen address(HTTP Proxy address)")
8585
flag.StringVar(&c.password, "p", "123456", "php server password")
8686
flag.StringVar(&c.sni, "sni", "", "HTTPS sni extension ServerName(default fetchserver hostname)")
8787
flag.StringVar(&c.fetchserver, "s", "https://a.bc.com/php-proxy/index.php", "php fetchserver path(http/https)")

proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (prx *proxy) init_proxy() {
3030
log.Panic(err)
3131
}
3232

33-
log.Println("Listening on " + prx.cfg.listen)
33+
log.Println("HTTP Proxy Listening on " + prx.cfg.listen)
3434

3535
//connect php server config
3636
prx.init_cfg()

0 commit comments

Comments
 (0)