ALADOWN-阿拉下载
首页
栏目分类
Website News
Software Recommend
WebSite Recommend
Technical Tutorials
Download Area
eBOOK Palace
About Us
About Us
首页
Website News
正文
Realm 转发
poctopus
2024-03-10 PM
1528℃
0条
Github项目:https://github.com/zhboner/realm 特点 支持DDNS 只要传入一个域名,那么就能自动后台更新解析。 支持DDNS 只要传入一个域名,那么就能自动后台更新解析。 高效,低消耗 依托于Rust语言,Realm保证内存安全。另外,相较于采用Go语言编写的Brook和gost,Realm执行速度更快,资源占用更低,非常适合在低配置的主机上使用。 简单 相较于使用iptables动辄几条复杂的命令,Realm仅需一条命令就能启动,保证了部署的方便。 UDP + TCP 无需额外的工作,Realm就能同时转发UDP和TCP。 安装Realm ```csharp wget -P /etc/realm https://github.com/zhboner/realm/releases/download/v2.1.4/realm-x86_64-unknown-linux-gnu.tar.gz tar -zxvf -C /etc/realm /etc/realm/realm-x86_64-unknown-linux-gnu.tar.gz chmod +x /etc/realm/realm ``` 直接运行 ```csharp # -l 指定监听的本机地址和端口,地址可以省略,但必须指定端口。不指定地址的话会使用默认的 127.0.0.1 地址。 # -r 指定转发的目的地址和端口,均不能省略。 /etc/realm/realm -l 中转机IP:端口 -r 落地机IP或域名:端口 ``` 配置文件 https://github.com/zhboner/realm/tree/master/examplesRealm 支持json和toml两种格式,推荐toml格式,书写结构上更易辨识。 ```csharp mkdir /etc/realm nano /etc/realm/config.toml ``` # 最简配置 ```csharp [[endpoints]] listen = "0.0.0.0:5000" remote = "1.2.3.4:443" [[endpoints]] listen = "0.0.0.0:6000" remote = "5.6.7.8:443" ``` # 常用配置 ```csharp [network] use_udp = true zero_copy = true [[endpoints]] listen = "0.0.0.0:5000" remote = "1.2.3.4:443" [[endpoints]] listen = "0.0.0.0:6000" remote = "5.6.7.8:443" ``` # 完整配置 ```csharp [dns] mode = "ipv4_only" protocol = "tcp_and_udp" nameservers = ["1.1.1.1:53", "1.0.0.1:53"] min_ttl = 600 max_ttl = 3600 cache_size = 256 [network] use_udp = true zero_copy = true fast_open = true tcp_timeout = 300 udp_timeout = 30 send_proxy = false send_proxy_version = 2 accept_proxy = false accept_proxy_timeout = 5 [[endpoints]] listen = "0.0.0.0:5000" remote = "1.2.3.4:443" [[endpoints]] listen = "0.0.0.0:6000" remote = "5.6.7.8:443" ``` #设置系统开机启动 ```csharp nano /etc/systemd/system/realm.service ``` ```csharp [Unit] Description=realm After=network-online.target Wants=network-online.target systemd-networkd-wait-online.service [Service] Type=simple User=root Restart=on-failure RestartSec=5s DynamicUser=true WorkingDirectory=/etc/realm ExecStart=/etc/realm/realm -c /etc/realm/config.toml [Install] WantedBy=multi-user.target ``` ```csharp systemctl daemon-reload systemctl enable realm systemctl restart realm systemctl status realm ``` Realm一键脚本 https://github.com/seal0207/EasyRealM ```csharp wget -N --no-check-certificate https://git.io/realm.sh && chmod +x realm.sh && ./realm.sh ```
标签:
linux
,
Debian
,
centos
,
端口转发
,
realm
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:
https://aladown.com/archives/Realm-%E8%BD%AC%E5%8F%91.html
上一篇
Win10/11太卡?又是百度网盘
下一篇
简易HTTP服务器simple-http-server
评论已关闭
日历
◄
2025年10月 (9)
2025年09月 (29)
2025年08月 (7)
2025年07月 (6)
2025年06月 (2)
2025年05月 (4)
2025年04月 (1)
2025年02月 (4)
2025年01月 (3)
2024年12月 (4)
2024年10月 (1)
2024年09月 (1)
2024年08月 (1)
2024年07月 (6)
2024年06月 (11)
2024年05月 (10)
2024年04月 (11)
2024年03月 (3)
2024年02月 (1)
2024年01月 (1)
2023年12月 (1)
2023年11月 (3)
2023年10月 (4)
2023年09月 (1)
2023年07月 (2)
2023年06月 (1)
2023年05月 (3)
2023年04月 (1)
2023年03月 (3)
2023年02月 (4)
2023年01月 (5)
2022年11月 (1)
2022年10月 (1)
2022年08月 (3)
2022年05月 (1)
2022年04月 (1)
2022年03月 (2)
2022年02月 (1)
2022年01月 (1)
2021年12月 (3)
2021年11月 (3)
2021年10月 (4)
2021年09月 (5)
2021年08月 (2)
2021年07月 (2)
2021年06月 (8)
2021年04月 (1)
2021年02月 (5)
2021年01月 (5)
2020年12月 (2)
2020年11月 (2)
2020年10月 (1)
2020年09月 (3)
2020年07月 (4)
2020年06月 (1)
2020年04月 (4)
2020年03月 (7)
2020年02月 (6)
2020年01月 (1)
2019年12月 (2)
2019年11月 (1)
2019年10月 (4)
2019年09月 (4)
2019年08月 (10)
2019年07月 (8)
2019年06月 (10)
2019年05月 (7)
2019年04月 (4)
2019年03月 (3)
2019年01月 (2)
2018年10月 (2)
2018年09月 (3)
2018年08月 (2)
2018年06月 (1)
2018年04月 (2)
2018年03月 (1)
2018年02月 (5)
2018年01月 (1)
2017年09月 (2)
2017年08月 (2)
2017年07月 (1)
2016年09月 (1)
2016年05月 (2)
2015年04月 (2)
2015年03月 (1)
2014年08月 (1)
2014年07月 (1)
2014年06月 (1)
2013年11月 (1)
2013年03月 (1)
2011年09月 (2)
2011年07月 (1)
2011年05月 (2)
2011年04月 (8)
2011年03月 (3)
2011年02月 (3)
2010年12月 (1)
2010年10月 (1)
2010年09月 (4)
2010年07月 (4)
2010年05月 (3)
2010年04月 (5)
2010年03月 (11)
2010年02月 (9)
2010年01月 (17)
2009年10月 (1)
2009年01月 (1)
2008年10月 (1)
►
一
二
三
四
五
六
日
1
2
3
4
5
5
6
7
8
9
10
11
12
13
1
14
15
16
1
17
18
19
20
1
21
22
23
1
24
25
26
27
28
29
30
31
栏目分类
Website News
326
Software Recommend
26
WebSite Recommend
4
Technical Tutorials
16
Download Area
37
eBOOK Palace
2
标签云
百度云盘
银河奇异果
NETWORK
MI
电子商务
GOOGLE
TCP
重装
真假鉴别
Ubuntu
国际惯例
shell
gfwlist
小蜜蜂
LTSC
SVG
征税
看图
监控
VPN
远程桌面
不稳定版
测试
FAVORITES
caddy
M7111-1331
ma c
centos 6
SWAP
GOOGLE CHROME
AnyConnect
原箱转运
i o s
囤积
小内存
良心云
install.direct
strongsan
屏幕
GOOGLE Authenticator
squid
testing
GAP
CNNIC
OFFICE 2016
Actions
TRACERT
tar
源码
DDOS
Nginx Proxy Manager
B2C
VIDEO
二级目录
KVM
爱奇艺
db
FDA
多开
内容加速
ln
内网
网盘
SWITCH
反编译
PEV TOOLS
HEIC
2008
TCP TIMESTAMPS
MIPS
sqlserver
文本文件
蓝牙
APPLE
MAC OS
自动订阅
ip地址
优化
MOBILE
Second SubFolder
外网
启动盘
1@1.
BACKUP
o c r
55S
SQL SERVER
dante
特价
OSD
美版
ICANN
Shimmy
隧道
减肥
海关
BASE64
敏感
pid
GFW列表
评论已关闭