[root@vultr ~]# date -R
Tue, 25 Jun 2019 21:23:52 +0800
[root@vultr ~]#
//如果时间与本地不一致,开始调整时区
[root@vultr ~]# timedatectl set-timezone Asia/Shanghai
//同步时区
[root@vultr ~]# ntpdate -u ntp.api.bz
[root@vultr ~]# date -R
Tue, 25 Jun 2019 21:27:30 +0800
//修改后再次查看时间是否一致
[root@vultr ~]wget https://install.direct/go.sh
[root@vultr ~]bash ./go.sh
---------------
PORT:40827
UUID:505f001d-4aa8-4519-9c54-6b65749ee3fb
----------------
//记下port以及UUID,不记也是可以的
[root@vultr ~]vim /etc/v2ray/config.json
//服务端配置文件修改为以下方式:该配置协议为ws path自定义为/johns
{
"inbounds": [
{
"port": '填写port端口,就是刚才出现的端口,或者自定义一个',
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "填写UUID,或者自己去生成一个",
"level": 1,
"alterId": 填写一个ID,例如1001,不要太大,不然可能会无法启动
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings":{
"path":"/johns"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}
[root@vultr ~]systemctl start v2ray//启动服务
[root@vultr ~]systemctl enable v2ray //设置服务开机自启动
[root@vultr ~]firewall-cmd --add-port=刚才的端口/tcp --zone=public --permanent
success
[root@vultr ~]firewall-cmd --reload
success
https://github.com/v2ray/v2ray-core/releases/download/v4.19.1/v2ray-windows-64.zip
https://github.com/v2fly/v2ray-core/archive/v4.18.1.zip
{
"inbounds": [
{
"port": ****,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "*****",
"level": 1,
"alterId": *****
}
],
"detour": {
"to": "dynamicPort"
}
},
"streamSettings": {
"network": "mkcp",
"kcpSettings": {
"uplinkCapacity": 5,
"downlinkCapacity": 100,
"congestion": true,
"header": {
"type": "none"
}
}
}
},
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamicPort",
"settings": {
"default": {
"alterId": ****
}
},
"allocate": {
"strategy": "random",
"concurrency": 5,
"refresh": 3
}
}
]
}
{
"inbounds": [
{
"port": ****,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "****",
"level": 1,
"alterId": ****
}
]
},
"streamSettings": {
"network": "mkcp",
"kcpSettings": {
"uplinkCapacity": 5,
"downlinkCapacity": 100,
"congestion": true,
"header": {
"type": "wechat-video"
}
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}
kcp服务端配置
v2ray服务端配置
{
"inbounds": [
{
"port": 1234,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "***********",
"level": 1,
"alterId": 12345
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"path": "/johns"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}
}
kcptun客户端配置
{
"listen": ":****",
"target": "127.0.0.1:1234",
"key": "****",
"crypt": "salsa20",
"mode": "fast3",
"mtu": 1350,
"sndwnd": 500,
"rcvwnd": 500,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": false,
"quiet": false,
"pprof": false
}
{
"localaddr": ":10086",
"remoteaddr": "******:****",
"key": "****",
"crypt": "salsa20",
"mode": "fast3",
"mtu": 1350,
"conn": 5,
"compression":false,
"sndwnd": 500,
"rcvwnd": 500,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": false,
"quiet": false
}