确保 v2board 版本在 1.2.5 及以上
一、安装与更新
bash <(curl -Ls https://raw.githubusercontent.com/sprov065/soga/master/install.sh)
二、同步时间(重要)
v2ray 节点需要进行时间同步,时间若与客户端相差太大则无法连接。
CentOS 7
yum install -y ntpsystemctl enable ntpdntpdate -q 0.rhel.pool.ntp.orgsystemctl restart ntpd
Debian 9 / Ubuntu 16
apt-get install -y ntpsystemctl enable ntpsystemctl restart ntp
或者(时间同步为上海)
rm -rf /etc/localtimeln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtimentpdate time.nist.gov
三、面板节点配置
添加节点
在面板后台 > 节点管理 > 添加节点:
- 节点名称:随便填写
- 权限组:随便填写
- 节点地址:填 v2borad 的域名或 ip
- TLS:填 v2borad 的域名或不填
- 传输协议:选择 websocket
配置协议
{ "lsy": "/"}
四、配置 soga
查看配置
soga config
自动配置
可以一行填写任意数量的配置信息,示例:
soga config type=v2board server_type=v2ray
编辑配置文件
配置文件位置:/etc/soga/soga.conf
基础配置示例:
type=v2board ## 对接的面板类型,可选SSpanel, V2board, NewV2board, PMpanel, Proxypanel, V2RaySocksserver_type=v2ray ## 对接的节点类型,可选V2ray, Shadowsocks, Trojanapi=webapi ## 对接的方式,可选webapi 或 db,表示 webapi 对接或数据库对接node_id=1 ## 前端节点idsoga_key= ## 授权密钥,社区版无需填写,最多支持88用户,商业版无限制
##webapi 对接webapi_url=https://*******.com/ ## 面板域名地址,或自定义个专用后端对接不提供访问的域名webapi_mukey=********************* ## 面板设置的通讯密钥
##数据库对接db_host=db.xxx.com ## 数据库地址db_port=3306 ## 数据库端口db_name=name ## 数据库名db_user=root ## 数据库用户名db_password=asdasdasd ## 数据库密码
user_conn_limit=0 ## 限制用户连接数,0代表无限制,v2board 必填!!!user_speed_limit=0 ## 用户限速,0代表无限制,单位 Mbps,v2board 必填!!!check_interval=100 ## 同步前端用户、上报服务器信息等间隔时间(秒),近似值force_close_ssl=false ## 设为true可强制关闭tls,即使前端开启tls,soga也不会开启tls,方便用户自行使用nginx、caddy等反代forbidden_bit_torrent=true ## 设为true可禁用bt下载default_dns=8.8.8.8,1.1.1.1 ## 配置默认dns,可在此配置流媒体解锁的dns,以逗号分隔
五、启动 soga
soga start
或者
soga