# frpc - 控制端

### frpc.toml - Windows RDP & Linux SSH

```toml
serverAddr = "8.137.15.230"
serverPort = 8000
# 如果默认的 STUN 服务器不可用，可以配置一个新的 STUN 服务器
natHoleStunServer = "stun.qq.com:3478"

auth.method = "token"
auth.token = "frpPassW0rd."

[[visitors]]
name = "p2p_rdp_visitor"
type = "xtcp"
# 要访问的 P2P 代理的名称
serverName = "p2p_rdp"
secretKey = "frp.3389"
# 绑定本地端口以访问 SSH 服务
bindAddr = "127.0.0.1"
bindPort = 33890
# 如果需要自动保持隧道打开，将其设置为 true
#keepTunnelOpen = true

[[visitors]]
name = "p2p_ssh_visitor"
type = "xtcp"
# 要访问的 P2P 代理的名称
serverName = "p2p_ssh"
secretKey = "frp.22"
# 绑定本地端口以访问 SSH 服务
bindAddr = "127.0.0.1"
bindPort = 60022
# 如果需要自动保持隧道打开，将其设置为 true
#keepTunnelOpen = true

# console or real logFile path like ./frpc.log
log.to = "/usr/local/frp/frpc.log"
# trace, debug, info, warn, error
log.level = "info"
log.maxDays = 30
# disable log colors when log.to is console, default is false
log.disablePrintColor = false
```

### 启动方式 - frpc command alias

```
# vim ~/.zshrc
# frpc
alias frpc='ps -ef | grep frpc | grep -v grep | awk "{print $2}" | xargs kill; nohup /usr/local/frp/frpc -c /usr/local/frp/frpc.toml >> /usr/local/frp/frpc.log 2>&1 &'

. ~/.zshrc
```
