0%

frp + v2ray 利用路由器做代理服务器

1、Dokcer安装 frps

1
docker run --restart=always --network host -d -v $PWD:/etc/frp --name frps snowdreamtech/frps

服务端配置文件 frps.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[common]
bind_addr = 0.0.0.0
bind_port = 7000
bind_udp_port = 7001
kcp_bind_port = 7000
vhost_http_port = 81
vhost_https_port = 84
dashboard_port = 7500
dashboard_user = user
dashboard_pwd = pwd
subdomain_host = host
log_max_days = 7
authentication_timeout = 0
token = token
allow_ports = 1-65535
max_pool_count = 20
max_ports_per_client = 20
log_file = /etc/frp/frps.log
log_level = info

2、v2ray 自定义配置

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
{
"inbounds": [
{
"port": 12340,
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"auth": "noauth"
}
},
{
"port": 12341,
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"auth": "noauth",
"udp": false
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}

2、frpc 配置

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
#frp.jsxz.cf是免费提供的frp服务器,如果需要使用,请修改下面两处的“test”为你的名称,比如"hello"
#然后可以通过http://hello.jsxz.cf访问你的设备
#如果无法正常使用,请更改名称,注意名称不能和别人重复
[common]
server_addr = host
server_port = 7000
token = token
user = user

[web]
type = http
local_port = 80
subdomain = w1

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 22

#[socks5_proxy]
#type = tcp
#remote_port = 12340
#plugin = socks5
#use_encryption = true
#plugin_http_user = user
#plugin_http_passwd =pwd

#[http_proxy]
#type = tcp
#remote_port = 12341
#plugin = http_proxy
#use_encryption = true
#plugin_http_user = user
#plugin_http_passwd = pwd

[ftp]
type = tcp
remote_port = 1234
plugin = static_file
# 要对外暴露的文件目录
plugin_local_path = /tmp/log
# 用户访问 URL 中会被去除的前缀,保留的内容即为要访问的文件路径
plugin_strip_prefix = static
plugin_http_user = user
plugin_http_passwd = pwd

[v2ray_socks5_proxy]
type = tcp
local_ip = 127.0.0.1
local_port = 12340
remote_port = 12340

[v2ray_http_proxy]
type = tcp
local_ip = 127.0.0.1
local_port = 12341
remote_port = 12341
iBoy wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!