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
1666℃
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
评论已关闭
博主动态 ~
日历
◄
2026年03月 (1)
2026年02月 (2)
2026年01月 (5)
2025年12月 (4)
2025年11月 (5)
2025年10月 (12)
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
1
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
327
Software Recommend
39
WebSite Recommend
5
Technical Tutorials
19
Download Area
37
eBOOK Palace
2
标签云
一键
debian 9
OFFICE
ROUTE
泄露
葆苾康
本地用户
技巧
SWF
xiaohongshu
网上购物
MAC OS
rustscan
屏幕
明治
apache
kernel
UFW
HTTPS
socksserver
EPEL
L-CARNITINE
debug
freedium
0DAY
dns
照片
防火墙
build
HDD
SERVER
rednote
SWITCH
图片查看器
CRAWL
realese
婴儿奶粉
NPC
Resource
二十二碳六烯酸软胶囊
Nginx Proxy Manager
中国大陆
geosite
SMARTPROXY
电信资费
京东购物
mongo
DESK
JPG
MOBILE
赴京
监控
安卓
IPSEC
国际惯例
ocserv
LABVIEW
高德地图
婴幼儿童
update
hostname
谷歌浏览器
搬瓦工
就近共享
FileStream
haproxy
PVE
企业微信
nat
扩容
万网
MI
win 10
no@thankyou.com
小蜜蜂
SORA
realm
postgres
proxy
HR
GUI
北海道
网络包测试
TCP
doq
MPEG
OBJECTS
激活
TRACERT
dashbooard
warn
戈蕾诗
RLOGIN
漏洞
双击无法打开
yum repo
FLV
奶粉
secure
免费快递
评论已关闭