对外端口

This commit is contained in:
Bunny 2024-01-11 16:33:46 +08:00
parent c3670b547c
commit 9597160ad9
2 changed files with 37 additions and 0 deletions

View File

@ -669,3 +669,40 @@ nameserver 114.114.114.114
nameserver 8.8.8.8 nameserver 8.8.8.8
``` ```
# 对外开放端口
## Jenkins
```sh
docker run -id --network host --name cpolar_jenkins probezy/cpolar
docker update --restart=always cpolar_jenkins
docker exec -it cpolar_jenkins bash
cpolar authtoken YzBiZjg0ZjItM2YxNS00OTk4LWI0ZTItYTNjMDBmMThkMWE3
cpolar http 8040
Forwarding http://1e9a3e5d.r18.cpolar.top -> http://localhost:8040
Forwarding https://1e9a3e5d.r18.cpolar.top -> http://localhost:8040
```
![img](./images/x4dH9UkfQWKdzzu27f62p9yP18OnKV.png)
## Gitea
```sh
docker run -id --network host --name cpolar_gitea probezy/cpolar
docker update --restart=always cpolar_gitea
docker exec -it cpolar_gitea bash
cpolar http 3000
Forwarding http://c74b179.r15.cpolar.top/-> http://localhost:3000
Forwarding https://c74b179.r15.cpolar.top/ -> http://localhost:3000
```
## SSH
```sh
docker run -id --network host --name cpolar probezy/cpolar
docker update --restart=always cpolar
docker exec -it cpolar bash
cpolar tcp 22
Forwarding 17.tcp.cpolar.top/-> http://localhost:22
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB