linux:v2ray
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:v2ray [2019/07/13 15:37] – percy | linux:v2ray [2021/10/02 22:32] (current) – [start/stop] percy | ||
---|---|---|---|
Line 26: | Line 26: | ||
===== start/stop ===== | ===== start/stop ===== | ||
- | + | | |
- | + | sudo systemctl restart v2ray | |
- | ``` | + | |
- | sudo systemctl start v2ray | + | |
- | sudo systemctl restart v2ray | + | |
- | ``` | + | |
===== Mac Install ===== | ===== Mac Install ===== | ||
Line 45: | Line 41: | ||
or run v2ray-core and register it to launch at login via: | or run v2ray-core and register it to launch at login via: | ||
brew services start v2ray-core | brew services start v2ray-core | ||
+ | brew services restart v2ray-core | ||
+ | ===== Router Install ===== | ||
+ | Download the correct version | ||
+ | - https:// | ||
+ | wget -cS https:// | ||
+ | unzip v2ray-linux-arm.zip | ||
+ | Then copy all the files to the router | ||
+ | scp -r v2ray root@miwifi.com:/ | ||
+ | Add execution permission | ||
+ | chmod +x v2ray | ||
+ | chmod +x v2ctl | ||
+ | Update the config.json, | ||
+ | ./v2ray --config=config.json | ||
+ | Testing the connection | ||
+ | curl -x socks5:// | ||
+ | Reference | ||
+ | - https:// | ||
===== Reference ===== | ===== Reference ===== | ||
- https:// | - https:// | ||
- | ==== Config file for client | + | ===== Config file for server ===== |
<file json> | <file json> | ||
{ | { | ||
- | " | ||
- | " | ||
- | }, | ||
" | " | ||
- | " | + | " |
" | " | ||
- | | + | " |
- | | + | |
" | " | ||
- | "auth": "noauth", | + | "clients": |
- | "udp": | + | { |
- | "ip": | + | "id": "58ceb1c6-b580-4d2c-bf41-21b6a35xxxx", |
+ | "level": | ||
+ | "alterId": | ||
+ | } | ||
+ | ] | ||
}, | }, | ||
- | | + | "streamSettings": { |
- | "enabled": | + | "network": |
- | "destOverride": | + | "wsSettings": |
- | } | + | |
- | }], | + | }, |
+ | "kcpSettings": { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | | ||
" | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }] | ||
- | } | ||
- | },{ | ||
" | " | ||
- | " | + | " |
- | " | + | |
},{ | },{ | ||
" | " | ||
Line 91: | Line 104: | ||
}], | }], | ||
" | " | ||
- | | + | " |
- | | + | { |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | ] | + | |
- | }, | + | |
- | { | + | |
" | " | ||
- | "domain": ["geosite:category-ads"], | + | "ip": ["geoip:private"], |
" | " | ||
- | } | + | |
] | ] | ||
}, | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | ==== Config file for client ==== | ||
+ | |||
+ | <code json> | ||
+ | { | ||
" | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
" | " | ||
- | " | + | " |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | ] | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
] | ] | ||
}, | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | ], | ||
" | " | ||
" | " | ||
- | "0": { | + | "8": { |
- | "uplinkOnly": | + | "connIdle": |
- | " | + | " |
+ | " | ||
+ | " | ||
} | } | ||
}, | }, | ||
" | " | ||
- | " | + | " |
- | " | + | " |
} | } | ||
}, | }, | ||
- | "other": {} | + | "routing": { |
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
} | } | ||
- | </file> | + | </code> |
+ | |||
+ | ==== v2ray with nginx ==== | ||
+ | - https:// | ||
/var/www/dokuwiki/wiki/data/attic/linux/v2ray.1563003471.txt.gz · Last modified: 2019/07/13 15:37 by percy