Skip to content

Commit

Permalink
更新使用方法
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-shiyu committed Apr 16, 2024
1 parent c1b8a98 commit bb9b941
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# http_echo_ip
一个只会输出IP的http服务,配合DDNS使用

参数
```
-l, --listen <LISTEN> 监听地址 [default: 127.0.0.1]
-p, --port <PORT> 监听端口号 [default: 80]
```
cli: `http_echo_ip -l 127.0.0.1 -p 23343`

docker: `docker run --name echo_ip -d --restart always --network host evlan/http_echo_ip -l 127.0.0.1 -p 23343`

配合nginx反代
```
location = /ip {
proxy_pass http://127.0.0.1:23343;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
```

0 comments on commit bb9b941

Please sign in to comment.