frps配置文件:
[common]
server_addr = frps服务器ip
server_port = 端口
privilege_token = token
log_file = ./frpc.log
log_level = info
log_max_days = 7
[test]
type = tcp
#需要穿透的ip
local_ip = 127.0.0.1
#需要穿透的端口
local_port = 22
use_compression = true
use_encryption = true
#服务器的端口
remote_port = 61000
openvpn守护进程:
#!/bin/bash
app_dir="/etc/openvpn"
app_dir_bin="${app_dir}/sbin/"
app_ini_dir="${app_dir}/server/"
app_ini="server.conf"
app_num=`ps aux|grep "${app_ini}"|grep -v grep|wc -l`
if test ${app_num} -eq 1 ;then
exit
else
ps -ef|grep "${app_ini}"|grep -v grep|cut -c 9-15|xargs kill -9
nohup ${app_dir_bin}openvpn ${app_ini_dir}${app_ini} &
fi
随便看看
文章排行
本栏推荐
栏目更新
Copyright 2020 Inc. AllRights Reserved. Design by frps配合openvpn