dockerfiles/tinyproxy/README.md

41 lines
1.3 KiB
Markdown
Raw Normal View History

2021-06-09 16:41:19 +08:00
# tinyproxy
2021-06-08 20:44:32 +08:00
2021-06-09 16:41:19 +08:00
GitHub [stilleshan/dockerfiles](https://github.com/stilleshan/dockerfiles)
2021-06-08 20:44:32 +08:00
Docker [stilleshan/tinyproxy](https://hub.docker.com/r/stilleshan/tinyproxy)
> *docker image support for X86 and ARM*
## docker 启动
```shell
docker run -d --name tinyproxy --restart always -p 8888:8888 stilleshan/tinyproxy
```
## docker compose 启动
2021-06-09 16:41:19 +08:00
下载 [docker-compose.yml](https://raw.githubusercontent.com/stilleshan/dockerfiles/main/tinyproxy/docker-compose.yml) 执行以下命令启动:
2021-06-08 20:44:32 +08:00
```shell
docker-compose up -d
```
## 使用示例
```shell
curl -x https://IP:8888 https://ifconfig.co
```
## BasicAuth
Tinyproxy 支持 BasicAuth 身份验证,需启动一次容器并执行以下命令将`tinyproxy.conf`拷贝至宿主机,并删除该容器.
```shell
docker cp tinyproxy:/etc/tinyproxy/tinyproxy.conf .
```
配置`BasicAuth user password`参数并将`tinyproxy.conf`挂载至`/etc/tinyproxy/tinyproxy.conf`后再次启动容器.
```shell
docker run -d --name tinyproxy --restart always -p 8888:8888 -v /path/tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf stilleshan/tinyproxy
```
### 使用示例
```shell
curl -x https://user:password@IP:8888 https://ifconfig.co
```
2021-06-09 16:41:19 +08:00
## 参考
[轻量级 HTTP/HTTPS 代理软件 Tinyproxy docker 部署教程](https://www.ioiox.com/archives/130.html)