macOS/iOS 代理 V2Ray 小白级配置

GitHub: https://github.com/V2Ray/v2ray-core
官方网站:https://www.v2ray.com/

服务端 Server 安装

Linux 安装脚本

1
bash <(curl -L -s https://install.direct/go.sh)

编辑 /etc/v2ray/config.json

只要改 port, id 即可。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"inbounds": [{
"port": 10000,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "uuid, 相关于 password,要与 Client 一致",
"level": 1,
"alterId": 64
}
]
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
},{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}],
"routing": {
"rules": [
{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "blocked"
}
]
}
}

启动 V2Ray 进程

1
2
service v2ray start
service v2ray status

status.png

运行脚本位于系统的以下位置:

  • /etc/systemd/system/v2ray.service: Systemd
  • /etc/init.d/v2ray: SysV

脚本运行完成后,你需要:

  1. 编辑 /etc/v2ray/config.json 文件来配置你需要的代理方式;
  2. 运行 service v2ray start 来启动 V2Ray 进程;
  3. 之后可以使用 service v2ray start|stop|status|reload|restart|force-reload 控制 V2Ray 的运行。

客户端

macOS: V2rayU

https://github.com/yanue/V2rayU

Configure…

V2rayU.png

生成的 json 格式配置文件

只需要关注

  • outbounds -> settings -> vnext -> address
  • outbounds -> settings -> vnext -> users -> id
  • outbounds -> settings -> vnext -> port
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"log": {
"error": "",
"loglevel": "info",
"access": ""
},
"inbounds": [
{
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"ip": "",
"userLevel": 0,
"timeout": 360,
"udp": false,
"auth": "noauth"
},
"port": "1080"
},
{
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"timeout": 360
},
"port": "1087"
}
],
"outbounds": [
{
"mux": {
"enabled": false,
"concurrency": 8
},
"protocol": "vmess",
"streamSettings": {
"tcpSettings": {
"header": {
"type": "none"
}
},
"tlsSettings": {
"allowInsecure": true
},
"security": "none",
"network": "tcp"
},
"tag": "agentout",
"settings": {
"vnext": [
{
"address": "服务器的 ip 地址",
"users": [
{
"id": "与服务端相同的 id",
"alterId": 64,
"level": 0,
"security": "auto"
}
],
"port": 10000
}
]
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"domainStrategy": "AsIs",
"redirect": "",
"userLevel": 0
}
},
{
"tag": "blockout",
"protocol": "blackhole",
"settings": {
"response": {
"type": "none"
}
}
}
],
"dns": {
"servers": [
""
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"outboundTag": "direct",
"type": "field",
"ip": [
"geoip:cn",
"geoip:private"
],
"domain": [
"geosite:cn",
"geosite:speedtest"
]
}
]
}
},
"transport": {}
}

查看一下网络代理

  • 不用自己修改
  • 不用自己修改
  • 不用自己修改

Proxy.png

iOS: Shadowrocket(小火箭)

提供一个暂时有效的 Apple ID,不是我的,无效不要来找我哦!

1
2
帐号:domiso.2019@hotmail.com
密码:Good456456

直接用 V2rayU 生成的 Share QR Code

config.png

QRCode.png

import.png

Shadowrocket.PNG

测试一下

AIDevLog.PNG

AIDevLog

iOSDevLog wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!