(未显示同一用户的2个中间版本) | |||
第5行: | 第5行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# switch to root user and then install | # switch to root user and then install | ||
sudo su - | $ sudo su - | ||
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) | $ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) | ||
systemctl enable v2ray | $ systemctl enable v2ray | ||
systemctl start v2ray | $ systemctl start v2ray | ||
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh) | $ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh) | ||
v2ray version | $ v2ray version | ||
V2Ray 5.22.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.23.2 linux/amd64) | V2Ray 5.22.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.23.2 linux/amd64) | ||
A unified platform for anti-censorship. | A unified platform for anti-censorship. | ||
第19行: | 第19行: | ||
== Basic Config == | == Basic Config == | ||
<syntaxhighlight lang="bash"> | |||
$ systemctl status v2ray | |||
● v2ray.service - V2Ray Service | |||
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; preset: enable> | |||
Drop-In: /etc/systemd/system/v2ray.service.d | |||
└─10-donot_touch_single_conf.conf | |||
Active: active (running) since Fri 2025-04-18 14:11:22 UTC; 5 months 17 da> | |||
Docs: https://www.v2fly.org/ | |||
Main PID: 719 (v2ray) | |||
Tasks: 14 (limit: 9441) | |||
Memory: 35.8M (peak: 103.4M) | |||
CPU: 8h 56min 41.528s | |||
CGroup: /system.slice/v2ray.service | |||
└─719 /usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config> | |||
Warning: some journal files were not opened due to insufficient permissions. | |||
</syntaxhighlight> | |||
/usr/local/etc/v2ray/config.json | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
{ | { | ||
第36行: | 第55行: | ||
restart v2ray server: | restart v2ray server: | ||
<syntaxhighlight lang="cpp"> | |||
sudo systemctl restart v2ray | $ sudo systemctl restart v2ray | ||
</syntaxhighlight> | |||
== V2RayU Client == | == V2RayU Client == |
2025年10月5日 (日) 09:59的最新版本
Install V2Ray (Server side)
Install
https://github.com/v2fly/fhs-install-v2ray
# switch to root user and then install
$ sudo su -
$ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
$ systemctl enable v2ray
$ systemctl start v2ray
$ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh)
$ v2ray version
V2Ray 5.22.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.23.2 linux/amd64)
A unified platform for anti-censorship.
Basic Config
$ systemctl status v2ray
● v2ray.service - V2Ray Service
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; preset: enable>
Drop-In: /etc/systemd/system/v2ray.service.d
└─10-donot_touch_single_conf.conf
Active: active (running) since Fri 2025-04-18 14:11:22 UTC; 5 months 17 da>
Docs: https://www.v2fly.org/
Main PID: 719 (v2ray)
Tasks: 14 (limit: 9441)
Memory: 35.8M (peak: 103.4M)
CPU: 8h 56min 41.528s
CGroup: /system.slice/v2ray.service
└─719 /usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config>
Warning: some journal files were not opened due to insufficient permissions.
/usr/local/etc/v2ray/config.json
{
"inbounds": [{
"port": 10086,
"protocol": "vmess",
"settings": {
"clients": [{ "id": "b831381d-6324-4d53-ad4f-8cda48b30811" }]
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}]
}
restart v2ray server:
$ sudo systemctl restart v2ray
V2RayU Client
Configure -> add v2ray server, input ip/port and client id.
Git ssh over socks proxy:
# vim ~/.ssh/config
Host github.com
HostName github.com
User git
ProxyCommand nc -v -x 127.0.0.1:1080 %h %p