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
1504℃
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月
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
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
栏目分类
Website News
325
Software Recommend
20
WebSite Recommend
4
Technical Tutorials
16
Download Area
37
eBOOK Palace
2
标签云
netstat
Macrovision
5355
KIT TOOLS
多开
PHP
SERVER
update
SSAE18
戈蕾诗
孕妇
IKE
推流
iptable
抢购
kill
邮政
EPEL
ActualTests
婴儿
MANGODB
闫凤娇
小程序
安全中心
官方脚本
ffmpeg
Calendar
tencent
格蕾诗
GUI
WEBBUILDER
强制登录
文道
BACKUP
dante
轻量
团购
IPV4
MACOS
GOOGLE CHROME
淘宝
fail
视频号
支付宝
debian 9
pcnd
PP
数据库
小米电视机
DrawDB
强制启动
虚拟主机
nftable
childlife
MPG
密度
python
ACDSEE VIDEO
中国直连
STT
MXNAVI
life's DHA
rsync
谷歌浏览器
edge
WECHAT
27001
解决方法
WireShark
WINDOWS STORE
reinstall
L-CARNITINE
BBR PLUS
ymt
SWAP
DVD
TYPE 2
扩容
Netflix 1080p
stable
GFW
Nginx Proxy Manager
postgre
改版
马丁
screen
callkit
美国邮政
XMANGER
工作簿
BT.CN
MICROSOFT
Sharepoint
obsolete
Subfolder
写盘工具
CRAWL
路由跟踪
TXT
飞书
评论已关闭