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 21:03] – 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> | ||
| { | { | ||
| - | | + | |
| - | "hosts": | + | "port": |
| - | " | + | "listen": "127.0.0.1", |
| - | "domain: | + | "protocol": "vmess", |
| - | " | + | "settings": { |
| - | "domain: | + | "clients": [ |
| - | }, | + | |
| - | "servers": | + | |
| - | " | + | |
| - | | + | |
| - | "address": | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | ] | + | |
| - | }, | + | |
| - | " | + | |
| { | { | ||
| - | | + | |
| - | "port": | + | "level": 1, |
| - | " | + | "alterId": |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | "udp": | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| } | } | ||
| - | | + | |
| - | " | + | |
| - | " | + | |
| }, | }, | ||
| - | | + | "streamSettings": { |
| - | " | + | " |
| - | { | + | " |
| - | " | + | " |
| - | " | + | }, |
| - | "vnext": [ | + | " |
| - | { | + | " |
| - | "address": "ef.pjq.mx", | + | " |
| - | " | + | " |
| - | "users": | + | " |
| - | { | + | " |
| - | "id": "58ceb1c6-b580-4d2c-bf41-21b6a35ae62x" | + | } |
| - | } | + | } |
| - | ] | + | } |
| - | } | + | } |
| - | ] | + | ], |
| - | }, | + | |
| - | "streamSettings": { | + | " |
| - | "kcpSettings": { | + | " |
| - | "congestion": | + | },{ |
| - | "downlinkCapacity": | + | |
| - | "header": { | + | " |
| - | "type": "none" | + | "tag": " |
| - | }, | + | }], |
| - | "uplinkCapacity": | + | " |
| - | | + | "rules": [ |
| - | "network": "mkcp" | + | { |
| - | } | + | "type": "field", |
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Config file for client ==== | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | { | ||
| + | | ||
| + | "protocol": | ||
| + | " | ||
| + | "auth": "noauth", | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | } | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | "outbounds": | ||
| + | | ||
| + | "mux": { | ||
| + | "enabled": | ||
| + | }, | ||
| + | "protocol": | ||
| + | "settings": { | ||
| + | "vnext": | ||
| + | { | ||
| + | | ||
| + | " | ||
| + | "users": | ||
| + | { | ||
| + | | ||
| + | "id": "58ceb1c6-b580-4d2c-bf41-21bxxxxxxxxxx", | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | | ||
| + | | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| }, | }, | ||
| - | | + | "wssettings": |
| - | | + | "connectionReuse": |
| - | "settings": | + | "headers": { |
| - | "tag": | + | "Host": "" |
| - | }, | + | }, |
| - | | + | "path": "xxxxx" |
| - | "protocol": "blackhole", | + | |
| - | " | + | |
| - | "tag": "blocked" | + | |
| } | } | ||
| - | ], | + | }, |
| - | "policy": | + | "tag": "proxy" |
| - | | + | }, |
| - | "0": | + | |
| - | "downlinkOnly": | + | "protocol": |
| - | "uplinkOnly": | + | "settings": |
| - | } | + | "tag": |
| - | }, | + | }, |
| - | "system": { | + | { |
| - | "statsInboundDownlink": | + | " |
| - | "statsInboundUplink": | + | "settings": { |
| + | "response": | ||
| + | "type": | ||
| } | } | ||
| + | }, | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| }, | }, | ||
| - | "routing": { | + | "system": { |
| - | "domainStrategy": | + | "statsInboundUplink": |
| - | "rules": | + | "statsInboundDownlink": |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| - | ] | + | |
| } | } | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| } | } | ||
| - | </file> | + | </code> |
| + | |||
| + | ==== v2ray with nginx ==== | ||
| + | - https:// | ||
/var/www/dokuwiki/wiki/data/attic/linux/v2ray.1563022995.txt.gz · Last modified: 2019/07/13 21:03 by percy
