TCP: 21115, 21116, 21117, 21118, 21119 UDP: 21116
Start-Process -FilePath "C:\Users\wjn\Downloads\rustdesk-1.4.5-x86_64.exe" -ArgumentList "/S" -Wait
1️⃣ 静默安装 RustDesk
$installer = "C:\Users\wjn\Downloads\rustdesk-1.4.5-x86_64.exe" $installDir = "D:\RustDesk"
Start-Process -FilePath $installer -ArgumentList "/S /D=$installDir" -Wait
2️⃣ 配置自建服务器
$configFile = "$installDir\config\rustdesk.toml"
如果配置目录不存在,先创建
if (-not (Test-Path "$installDir\config")) { New-Item -ItemType Directory -Path "$installDir\config" | Out-Null }
写入服务器配置
@" [network] id_server = "192.168.3.12:21115" relay_server = "192.168.3.12:21116" "@ | Set-Content -Path $configFile -Encoding UTF8
$configPath = "$env:APPDATA\RustDesk\rustdesk.toml"
如果目录不存在,创建它
if (-not (Test-Path "$env:APPDATA\RustDesk")) { New-Item -ItemType Directory -Path "$env:APPDATA\RustDesk" | Out-Null }
写入服务器地址
@" [network] id_server = "192.168.3.12:21115" relay_server = "relay.yourserver.com:21116" "@ | Set-Content -Path $configPath -Encoding UTF8
services: hbbs: container_name: hbbs image: rustdesk/rustdesk-server:latest command: hbbs volumes: - ./data:/root network_mode: "host"
depends_on:
- hbbr
restart: unless-stopped
hbbr: container_name: hbbr image: rustdesk/rustdesk-server:latest command: hbbr volumes: - ./data:/root network_mode: "host" restart: unless-stopped
内网穿透
本地地址: 192.168.3.12:5005/apache/rocketmq:5.4.0 直接docker pull docker.catpd.cn/apache/rocketmq:5.4.0
- nginx 配置
server {
#SSL 默认访问端口号为 443
listen 443 ssl;
#请填写绑定证书的域名
server_name docker.catpd.cn;
#请填写证书文件的相对路径或绝对路径
ssl_certificate /etc/letsencrypt/live/catpd.cn/fullchain.pem; # managed by Certbot
#请填写私钥文件的相对路径或绝对路径
ssl_certificate_key /etc/letsencrypt/live/catpd.cn/privkey.pem; # managed by Certbot
ssl_session_timeout 5m;
#请按照以下协议配置
ssl_protocols TLSv1.2 TLSv1.3;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
}
}
- frp 配置
[[proxies]]
name = "12-dockerhub"
type = "tcp"
localIP = "localhost"
localPort = 5005
remotePort = 5000