惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Project Zero
Project Zero
月光博客
月光博客
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
O
OpenAI News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Know Your Adversary
Know Your Adversary
Last Week in AI
Last Week in AI
S
Securelist
Engineering at Meta
Engineering at Meta
博客园 - 司徒正美
P
Privacy & Cybersecurity Law Blog
T
Tailwind CSS Blog
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
C
Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
Hacker News: Ask HN
Hacker News: Ask HN
Hugging Face - Blog
Hugging Face - Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
Lohrmann on Cybersecurity
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
I
InfoQ
S
Security @ Cisco Blogs
Webroot Blog
Webroot Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
人人都是产品经理
人人都是产品经理
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
B
Blog RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research

puzzle9 blog

webdav - puzzle9 blog parser video tencent - puzzle9 blog wstunnel - puzzle9 blog rclone - puzzle9 blog debian 转换为 pve - puzzle9 blog nfs - puzzle9 blog caddy - puzzle9 blog webhookd 发布 - puzzle9 blog win 系统部署 by WinRM - puzzle9 blog hl7 初探 - puzzle9 blog realm 端口转发 - puzzle9 blog airflow - puzzle9 blog mysql 迁移到 mssql - puzzle9 blog 租房啊 - puzzle9 blog cr660x 路由器研究 - puzzle9 blog hs8145v 光猫研究 - puzzle9 blog dae 跨墙 - puzzle9 blog ZeroTier 打洞 🕊 - puzzle9 blog WireGuard 组网 - puzzle9 blog
rathole 穿透 - puzzle9 blog
2025-06-10 · via puzzle9 blog

要说 什么简单 省心

唯有 穿透

就是有点耗 流量红尘

定义

这是个内网穿透工具 类似于 frp nps

安装

alpine

1
2
3
4
wget https://mirror.nju.edu.cn/alpine/edge/testing/x86_64/rathole-0.5.0-r0.apk
apk add ./rathole-0.5.0-r0.apk

mkdir /etc/rathole

/etc/init.d/ratholec

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/sbin/openrc-run

name="Rathole Client Service"
description="Rathole Client Service"
command="/usr/bin/rathole"
command_args="-c /etc/rathole/rathole.toml"
pidfile="/run/$SVCNAME.pid"
command_background=true

depend() {
need net
after firewall
}
1
2
3
chmod +x /etc/init.d/ratholec
rc-service ratholec start
rc-update add ratholec

debian

1
2
3
4
5
6
apt install unzip
wget https://github.com/yujqiao/rathole/releases/download/v0.5.0/rathole-x86_64-unknown-linux-gnu.zip
unzip -d /usr/bin/ rathole-x86_64-unknown-linux-gnu.zip
chmod +x /usr/bin/rathole

mkdir /etc/rathole

/etc/systemd/system/ratholes.service

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[Unit]
Description=Rathole Server Service
After=network.target

[Service]
Type=simple
Restart=on-failure
RestartSec=5s
LimitNOFILE=1048576
User=root

WorkingDirectory=/etc/rathole
ExecStart=/usr/bin/rathole -s /etc/rathole/rathole.toml

[Install]
WantedBy=multi-user.target
1
systemctl enable ratholes.service --now

openwrt

/etc/init.d/rathole

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh /etc/rc.common

START=99
USE_PROCD=1
PROG=/data/rathole/rathole

start_service() {
procd_open_instance
procd_set_param command "$PROG" -c /data/rathole/rathole.toml
procd_set_param respawn
procd_close_instance
}

stop_service() {
killall rathole
}

配置

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
[server]

bind_addr = "0.0.0.0:2333"
default_token = "rathole"

[client]

remote_addr = "{ip}:2333"
default_token = "rathole"


[server.transport]
type = "noise"
[server.transport.noise]
local_private_key = "nKdq0NUp3pcnRzfQEtFI/Qe/GdO6zYh1G56etEZgeIo="

[client.transport]
type = "noise"
[client.transport.noise]
remote_public_key = "OZgtXqojrnphLrNL/o8tFYxkRDCPNaoRfRxbuMOgqHg="


[server.services.go]
bind_addr = "0.0.0.0:16070"


[client.services.go]
local_addr = "127.0.0.1:6070"

这个配置文件可以写到一起 他是用 命令 去区分 当前是运行的 服务端 --server 还是 客户端 --client
置于区分是不是同一个服务 用的是 services.{name} 进行区分的
这个keyrathole --genkey 生成

运行

supervisor

1
2
3
4
[program:rathole]
command=rathole --client /data/rathole/config.toml
directory=/data/rathole
user=root