我想为其创建一个单元文件stunnel
,但我不知道为什么它会失败。
我的 stunnel.conf 是这样的:
#Provide the full path to your certificate-key pair file
cert = /etc/pki/tls/certs/stunnel.pem
#lock the process into a chroot jail
chroot = /var/run/stunnel
# and create the PID file in this jail
pid = /stunnel.pid
#change the UID and GID of the process for security reasons
setuid = nobody
setgid = nobody
#enable client mode
client = yes
socket = l:TCP_NODELAY=1
#socket = r:TCP:NODELAY=1
[mysqls]
accept = 127.0.0.1:3306
connect = 10.0.0.3:3307
Run Code Online (Sandbox Code Playgroud)
当我执行stunnel /etc/stunnel/stunnel.conf
然后它工作。 …