mirror of https://github.com/jkjoy/sunpeiwen.git
69 lines
1.4 KiB
Markdown
69 lines
1.4 KiB
Markdown
---
|
|
abbrlink: 6d58ffa9
|
|
categories:
|
|
- - 分享
|
|
cover: 'https://blog.dasbid.com/upload/image-bvkn.png'
|
|
date: '2023-05-18T16:23:20.354081+08:00'
|
|
excerpt: ...
|
|
tags:
|
|
- cloudflare
|
|
title: 使用cloudflare Tunnels实现内网穿透
|
|
updated: '2023-5-18T16:27:3.464+8:0'
|
|
---
|
|
## 使用cloudflare Tunnels实现内网穿透
|
|
|
|
### 准备工作
|
|
|
|
* 一个顶级域名
|
|
* 更改DNS解析服务器
|
|
* 等待生效
|
|
|
|
### 打开 [Tunnels](https://one.dash.cloudflare.com/165012cc0f623729405e26de2fb3f876/access/tunnels)
|
|
|
|
![](https://blog.dasbid.com//upload/image.png)
|
|
|
|
### 点击**create a Tunnels**
|
|
|
|
![](https://blog.dasbid.com/upload/image-bvkn.png)![](https://blog.dasbid.com//upload/image.png)
|
|
|
|
### 随意输入一个名称用以区分
|
|
|
|
![](https://blog.dasbid.com//upload/image-qzcq.png)
|
|
|
|
选一个服务端软件\~用以启动\~
|
|
|
|
### 以群晖为例
|
|
|
|
群晖就选择**docker**
|
|
|
|
![](https://blog.dasbid.com//upload/image-jjnh.png)复制命令行启动\~
|
|
|
|
#### **群晖要在root权限下执行**
|
|
|
|
#### 获取root只需要
|
|
|
|
```bash
|
|
|
|
sudo su
|
|
```
|
|
|
|
![](https://blog.dasbid.com//upload/image-jsyd.png)
|
|
|
|
#### 按需填写
|
|
|
|
**Subdomain** 随便一个A记录
|
|
|
|
**Domain **选择一个域名
|
|
|
|
**Path **可以为空
|
|
|
|
**Type**可以填写HTTP或者HTTPS
|
|
|
|
**URL **填写localhost加上端口号
|
|
|
|
保存即可\~
|
|
|
|
#### 演示地址
|
|
|
|
[https://h.imsun.pw](https://h.imsun.pw)
|