feat: add frps/frpc/mineru-sgalng

This commit is contained in:
Sun-ZhenXing
2025-09-24 09:28:28 +08:00
parent 79ad907def
commit 232517b58f
11 changed files with 279 additions and 9 deletions

32
src/frpc/README.md Normal file
View File

@@ -0,0 +1,32 @@
# FRPC
内网穿透客户端。
以 SSH 服务穿透为例,新建 `frpc.toml` 配置文件,内容如下:
```toml
[common]
server_addr = {{ .Envs.FRP_SERVER_ADDR }}
server_port = {{ .Envs.FRP_SERVER_PORT }}
token = {{ .Envs.FRP_SERVER_TOKEN }}
[app_22]
type = "tcp"
remote_port = 23922
local_ip = 192.168.10.100
local_port = 22
```
配置远程 FRPS 服务地址到 `.env` 文件中:
```properties
FRP_SERVER_ADDR=frps.example.com
FRP_SERVER_PORT=9870
FRP_SERVER_TOKEN=password
```
启动服务,即可代理 `192.168.10.100:22``FRP_SERVER_ADDR:23922`
```bash
docker compose up -d
```

View File

@@ -0,0 +1,30 @@
x-default: &default
restart: unless-stopped
volumes:
- &localtime /etc/localtime:/etc/localtime:ro
- &timezone /etc/timezone:/etc/timezone:ro
logging:
driver: json-file
options:
max-size: 100m
services:
frpc:
<<: *default
image: snowdreamtech/frpc:${FRPC_VERSION:-0.64.0}
volumes:
- *localtime
- *timezone
- ./frpc.toml:/etc/frp/frpc.toml:ro
environment:
FRP_SERVER_ADDR: ${FRP_SERVER_ADDR}
FRP_SERVER_PORT: ${FRP_SERVER_PORT}
FRP_SERVER_TOKEN: ${FRP_SERVER_TOKEN}
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M
reservations:
cpus: '0.1'
memory: 64M

10
src/frpc/frpc.toml Normal file
View File

@@ -0,0 +1,10 @@
[common]
server_addr = {{ .Envs.FRP_SERVER_ADDR }}
server_port = {{ .Envs.FRP_SERVER_PORT }}
token = {{ .Envs.FRP_SERVER_TOKEN }}
[app]
type = "tcp"
remote_port = 22
local_ip = {{ .Envs.APP_HOST }}
local_port = 22