-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path976.html
440 lines (392 loc) · 43.9 KB
/
976.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>《搭建一个合适自己的梯子》节点搭建篇 | SKY博客</title><meta name="keywords" content="vps,科学上网,Xray,域名,cdn,Cloudflare"><meta name="author" content="阿宝哥呀"><meta name="copyright" content="阿宝哥呀"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="前言本篇仍旧是新手向,有Linux基础的同学可以看我之前写的那篇。 科学上网服务器搭建 不再受限于人!(v2ray/xray/trojan) 另外,不出意外的话这也应该是最后一篇了,本篇我将仔细给大家讲讲梯子的原理以及实现方法,没有看前两篇的同学可以先去看看前两篇。 《搭建一个合适自己的梯子》域名注册篇(新手基础) 《搭建一个合适自己的梯子》服务器挑选篇 此外,我之前也说过的,">
<meta property="og:type" content="article">
<meta property="og:title" content="《搭建一个合适自己的梯子》节点搭建篇">
<meta property="og:url" content="https://www.sky350.com/976.html">
<meta property="og:site_name" content="SKY博客">
<meta property="og:description" content="前言本篇仍旧是新手向,有Linux基础的同学可以看我之前写的那篇。 科学上网服务器搭建 不再受限于人!(v2ray/xray/trojan) 另外,不出意外的话这也应该是最后一篇了,本篇我将仔细给大家讲讲梯子的原理以及实现方法,没有看前两篇的同学可以先去看看前两篇。 《搭建一个合适自己的梯子》域名注册篇(新手基础) 《搭建一个合适自己的梯子》服务器挑选篇 此外,我之前也说过的,">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://pic.sky350.cn/images/21.jpg">
<meta property="article:published_time" content="2021-11-15T10:24:50.000Z">
<meta property="article:modified_time" content="2024-12-24T06:31:46.269Z">
<meta property="article:author" content="阿宝哥呀">
<meta property="article:tag" content="vps">
<meta property="article:tag" content="科学上网">
<meta property="article:tag" content="Xray">
<meta property="article:tag" content="域名">
<meta property="article:tag" content="cdn">
<meta property="article:tag" content="Cloudflare">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://pic.sky350.cn/images/21.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://www.sky350.com/976"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//www.google-analytics.com" crossorigin=""/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: 'ca-pub-5201315122723978',
enable_page_level_ads: 'true'
});</script><script async="async" src="https://www.googletagmanager.com/gtag/js?id=G-VWC1BXX7W2"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VWC1BXX7W2');
</script><link rel="stylesheet" href="https://fonts.loli.net/css?family=Titillium+Web&display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
fancybox: {
js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
}
},
isPhotoFigcaption: false,
islazyload: true,
isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '《搭建一个合适自己的梯子》节点搭建篇',
isPost: true,
isHome: false,
isHighlightShrink: false,
isToc: true,
postUpdate: '2024-12-24 14:31:46'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const detectApple = () => {
if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
document.addEventListener('pjax:complete', detectApple)})(window)</script><meta name="generator" content="Hexo 5.4.1"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/Circle_Logo.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">50</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tag/"><div class="headline">标签</div><div class="length-num">207</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/category/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/category/app/"><i class="fa-fw fab fa-github"></i><span> 上网神器</span></a></div><div class="menus_item"><a class="site-page" href="/category/technical/"><i class="fa-fw fab fa-chrome"></i><span> 玩法开启</span></a></div><div class="menus_item"><a class="site-page" href="/category/course/"><i class="fa-fw fas fa-book"></i><span> 系列教程</span></a></div><div class="menus_item"><a class="site-page" href="/category/ordinary/"><i class="fa-fw fas fa-file-alt"></i><span> 闲扯文档</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://ai.sky350.com"><i class="fa-fw fa-solid fa-message"></i><span> ChatGPT</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://shop.qqka.org"><i class="fa-fw fa-solid fa-cart-shopping"></i><span> 小卖店</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://itbao.ge"><i class="fa-fw fab fa-chrome"></i><span> IT宝哥</span></a></div><!-- 添加语言切换菜单项--><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> Language</span><i class="fas fa-chevron-down expand"></i></a><!-- 子菜单:语言选项--><ul class="menus_item_child"><li><a class="site-page child" href="javascript:translate.changeLanguage('english');">English</a></li><li><a class="site-page child" href="javascript:translate.changeLanguage('chinese_simplified');">简体中文</a></li><li><a class="site-page child" href="javascript:translate.changeLanguage('chinese_traditional');">繁體中文</a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://pic.sky350.cn/images/21.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">SKY博客</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/category/app/"><i class="fa-fw fab fa-github"></i><span> 上网神器</span></a></div><div class="menus_item"><a class="site-page" href="/category/technical/"><i class="fa-fw fab fa-chrome"></i><span> 玩法开启</span></a></div><div class="menus_item"><a class="site-page" href="/category/course/"><i class="fa-fw fas fa-book"></i><span> 系列教程</span></a></div><div class="menus_item"><a class="site-page" href="/category/ordinary/"><i class="fa-fw fas fa-file-alt"></i><span> 闲扯文档</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://ai.sky350.com"><i class="fa-fw fa-solid fa-message"></i><span> ChatGPT</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://shop.qqka.org"><i class="fa-fw fa-solid fa-cart-shopping"></i><span> 小卖店</span></a></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://itbao.ge"><i class="fa-fw fab fa-chrome"></i><span> IT宝哥</span></a></div><!-- 添加语言切换菜单项--><div class="menus_item"><a class="site-page" href="javascript:void(0);"><span> Language</span><i class="fas fa-chevron-down expand"></i></a><!-- 子菜单:语言选项--><ul class="menus_item_child"><li><a class="site-page child" href="javascript:translate.changeLanguage('english');">English</a></li><li><a class="site-page child" href="javascript:translate.changeLanguage('chinese_simplified');">简体中文</a></li><li><a class="site-page child" href="javascript:translate.changeLanguage('chinese_traditional');">繁體中文</a></li></ul></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">《搭建一个合适自己的梯子》节点搭建篇</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-11-15T10:24:50.000Z" title="发表于 2021-11-15 18:24:50">2021-11-15</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-12-24T06:31:46.269Z" title="更新于 2024-12-24 14:31:46">2024-12-24</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/category/course/">系列教程</a></span></div><div class="meta-secondline"></div></div></div></header><main class="layout" id="content-inner"><div id="post"><div class="ads-wrap"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5201315122723978" data-ad-slot="8080086871" data-ad-format="auto" data-full-width-responsive="true"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div><article class="post-content" id="article-container"><h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>本篇仍旧是新手向,有Linux基础的同学可以看我之前写的那篇。</p>
<p><a href="https://www.sky350.com/576.html">科学上网服务器搭建 不再受限于人!(v2ray/xray/trojan)</a></p>
<p>另外,不出意外的话这也应该是最后一篇了,本篇我将仔细给大家讲讲梯子的原理以及实现方法,没有看前两篇的同学可以先去看看前两篇。</p>
<p><a href="https://www.sky350.com/884.html">《搭建一个合适自己的梯子》域名注册篇(新手基础)</a></p>
<p><a href="https://www.sky350.com/951.html">《搭建一个合适自己的梯子》服务器挑选篇</a></p>
<p>此外,我之前也说过的,<strong>出墙了也要遵守好法律法规,网络绝不是法外之地,出去看看油管看看ins没啥关系。</strong></p>
<h3 id="梯子原理"><a href="#梯子原理" class="headerlink" title="梯子原理"></a>梯子原理</h3><p>大家应该都知道的,我国对网民的信息安全非常看重,要求进入我国市场的企业需要将存放用户信息的服务器设在国内,苹果公司都乖乖的将服务器设在贵州了,但是有些企业是不愿意这么做的,比如谷歌。所以,它被隔离在长城防火墙之外了,我们普通用户也就无法正常去使用它的服务了。</p>
<p>既然明白了为什么不能正常访问,那就可以准对原因找方法了。首先,大陆不能正常访问,但是大陆之外的地区都可以正常访问,包括港澳台地区,那我们的思路就是在大陆和被ban掉的站点之间增加一个中转节点,这个问题就得以解决了,事实上也确实是这样的。大家不明白的话可以看看下面的图解。</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_1.png"></p>
<center>受限制的网络</center>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_2.png"></p>
<center>梯子实现的网络</center>
<h3 id="获取公网IP"><a href="#获取公网IP" class="headerlink" title="获取公网IP"></a>获取公网IP</h3><p>讲完原理了我们就可以着手去实现它了,首先我们需要能连接到提供中转服务的服务器,也就是我们所购买的vps,没有网络基础的同学,现在你可以知道,连接到一台服务器,可以通过IP地址来实现,前提它是公网IP,怎么区分呢,一般管理面板都会注明IPv4地址或者IPv6地址,如果它显示了两个地址,那10/172/192开头的是内网地址,此外,纯IPv6的服务器只能使用IPv6网络,需自身也接入IPv6网络,再者目前大多数服务是由IPv4提供的,所以限制比较大。</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_3.png"></p>
<p>HOST地址就是IP</p>
<h3 id="ssh连接服务器"><a href="#ssh连接服务器" class="headerlink" title="ssh连接服务器"></a>ssh连接服务器</h3><p>当我们拿大vps服务器的IP地址后,就可以通过软件连接到我们的服务器(服务器安装Centos或者debian系统),推荐大家使用Finalshell来进行连接,首先打开,点击左上添加服务器,输入ip,用户名和密码,然后连接即可。</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_4.png"></p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_5.png"></p>
<p>主机填写服务器IP,名称随意</p>
<h3 id="安装管理面板"><a href="#安装管理面板" class="headerlink" title="安装管理面板"></a>安装管理面板</h3><p>连接到我们的服务器后,软件给我们展现的是一个命令模式的面板,不要慌,操作依旧简单,复制下面的一键脚本,粘贴到软件面板里,回车</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)</span><br></pre></td></tr></table></figure>
<p>如果你的vps提示curl: command not found,先复制下面的代码安装curl,再执行上面的脚本。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">apt install -y curl #ubuntu/debian 系统安装 Curl </span><br><span class="line">yum install curl -y #centos 系统安装 Curl</span><br></pre></td></tr></table></figure>
<p>安装过程很迅速,几乎一瞬之间你就能看到下面的提示,控制面板地址为:IP:54321,默认账号密码都是admin</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_6.png"></p>
<p>完事基础安装就完成了。</p>
<h3 id="进阶配置"><a href="#进阶配置" class="headerlink" title="进阶配置"></a>进阶配置</h3><p>到了进阶的安全配置,大家的一域名终于能用得上了,我推荐首先将域名托管到Cloudflare平台,它不仅解析速度快,还提供免费的CDN加速,我们隐藏自己的真实IP就需要用到它。具体步骤如下</p>
<p>首先注册个Cloudflare账号,登陆点击添加站点,输入你注册的域名</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_7.png"></p>
<p>选择计划时滑到页面底部选择免费即可,下一步,看到提示完成站点激活</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_8.png"></p>
<p>很简单,登录到域名后台,以腾讯云为例,点击域名后面的更多–>修改DNS</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_9.png"></p>
<p>在弹出的窗口中输入Cloudflare需要你替换的DNS</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_10.png"></p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_11.png"></p>
<p>修改完成后保存就好,修改域名DNS服务器生效时间一般情况下是24小时,所以大家不要频繁更换域名DNS,在Cloudflare检测到你的域名DNS指向它时,生效邮件就会发送到你的邮箱。</p>
<p>成功将域名托管到Cloudflare后,做域名解析需要到Cloudflare上进行。</p>
<h3 id="新建节点"><a href="#新建节点" class="headerlink" title="新建节点"></a>新建节点</h3><p>一台vps服务器我们一般推荐开启两个服务端口(节点),一个只用协议本身加密,它的速度较快,但是也更容易被长城防火墙扫到封禁;另一个是套用CDN,隐藏我们的真实IP,开启CDN对速度有影响,如果地理位置和使用的家庭宽带比较合适,那么节点的速度可能会更快,反之则会更慢,但不论快慢,它的安全性是非常高的。</p>
<p>首先登陆我们的管理面板(上面安装的,浏览器打开IP:54321),在入站列表里点击左边的加号,选一个协议,个人推荐vless,加密性好,速度也快,参数不需要懂,默认就好,可以填个备注,就这么简单就创建完一个节点了。</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_12.png"></p>
<p>完事点击操作–二维码–复制,将节点信息导入科学上网软件 即可使用。</p>
<h3 id="开启CDN"><a href="#开启CDN" class="headerlink" title="开启CDN"></a>开启CDN</h3><p>我们先处理域名的部分,首先将域名解析到服务器,登陆Cloudflare,点击已添加的域名,点击DNS,添加记录,选择A记录,名称可以随便填,IPv4 地址为自己vps服务器的IP地址,代理状态开启,保存</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_13.png"></p>
<p>解析完域名之后,点击ssl/tls,将安全模式改为完全</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_14.png"></p>
<p>之后点击客户端证书,创建一个证书,新建两个文件将生成的pem和key保存好,否则下次要使用只能再重新创建了</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_15.png"></p>
<p>到此域名部分我们已经搞定了</p>
<p>接下来回到我们的管理面板,点击加号,协议仍旧选vless,端口改为443,传输选择ws,路径随便写,开启tls,域名填写自己解析的二级域名,将刚刚申请到的证书填入,pem对应公钥,key对应私钥</p>
<p><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/976_16.png"></p>
<p>完事点击操作–二维码–复制,将节点信息导入科学上网软件,还没下载有的可以看本站<a href="https://www.sky350.com/category/app">上网神器</a></p>
<p>到此完成了所有步骤,如果你能耐心看到这一步,你应该已经成功了!</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">阿宝哥呀</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://www.sky350.com/976.html">https://www.sky350.com/976.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://www.sky350.com" target="_blank">SKY博客</a>!</span></div></div><div class="ads-wrap"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5201315122723978" data-ad-slot="8080086871" data-ad-format="auto" data-full-width-responsive="true"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tag/vps/">vps</a><a class="post-meta__tags" href="/tag/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/">科学上网</a><a class="post-meta__tags" href="/tag/xray/">Xray</a><a class="post-meta__tags" href="/tag/%E5%9F%9F%E5%90%8D/">域名</a><a class="post-meta__tags" href="/tag/cdn/">cdn</a><a class="post-meta__tags" href="/tag/cloudflare/">Cloudflare</a></div><div class="post_share"><div class="social-share" data-image="https://pic.sky350.cn/images/21.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/1062.html"><img class="prev-cover" src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/1001_2.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Cloudcone超便宜VPS简单评测(黑五打折套餐)</div></div></a></div><div class="next-post pull-right"><a href="/1000.html"><img class="next-cover" src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/33.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">《高效使用你的VPS》Wordpress博客进阶优化 伪静态/缓存/邮件配置</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/1215.html" title="x-ui+宝塔面板,共用443实现网站+梯子(vless+ws+tls+nginx)"><img class="cover" src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/2022/1657984315.6784494.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-07-16</div><div class="title">x-ui+宝塔面板,共用443实现网站+梯子(vless+ws+tls+nginx)</div></div></a></div><div><a href="/951.html" title="《搭建一个合适自己的梯子》服务器挑选篇"><img class="cover" src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/21.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-10-31</div><div class="title">《搭建一个合适自己的梯子》服务器挑选篇</div></div></a></div><div><a href="/576.html" title="科学上网服务器搭建 不再受限于人!(v2ray/xray/trojan)"><img class="cover" src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/576_1.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-08-31</div><div class="title">科学上网服务器搭建 不再受限于人!(v2ray/xray/trojan)</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/Circle_Logo.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">阿宝哥呀</div><div class="author-info__description">Linux技术,网络技术,宝塔面板,邮局配置,域名设置,脚本运行,CentOS,Debian,Nginx</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">50</div></a></div><div class="card-info-data-item is-center"><a href="/tag/"><div class="headline">标签</div><div class="length-num">207</div></a></div><div class="card-info-data-item is-center"><a href="/category/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://www.youtube.com/channel/UCECSuDUCVYdpBVF-0YlZAig"><i class="fab fa-youtube"></i><span>订阅我吧</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">ChatGPT在线网站ai.sky350.com已经上线,欢迎大家使用。</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%89%8D%E8%A8%80"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%A2%AF%E5%AD%90%E5%8E%9F%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text">梯子原理</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%8E%B7%E5%8F%96%E5%85%AC%E7%BD%91IP"><span class="toc-number">3.</span> <span class="toc-text">获取公网IP</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ssh%E8%BF%9E%E6%8E%A5%E6%9C%8D%E5%8A%A1%E5%99%A8"><span class="toc-number">4.</span> <span class="toc-text">ssh连接服务器</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E7%AE%A1%E7%90%86%E9%9D%A2%E6%9D%BF"><span class="toc-number">5.</span> <span class="toc-text">安装管理面板</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%BF%9B%E9%98%B6%E9%85%8D%E7%BD%AE"><span class="toc-number">6.</span> <span class="toc-text">进阶配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B0%E5%BB%BA%E8%8A%82%E7%82%B9"><span class="toc-number">7.</span> <span class="toc-text">新建节点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BC%80%E5%90%AFCDN"><span class="toc-number">8.</span> <span class="toc-text">开启CDN</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/1271.html" title="WordPress优化之根据Cookies配置CloudFlare缓存规则"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/2024/09/24/46qvzo.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="WordPress优化之根据Cookies配置CloudFlare缓存规则"/></a><div class="content"><a class="title" href="/1271.html" title="WordPress优化之根据Cookies配置CloudFlare缓存规则">WordPress优化之根据Cookies配置CloudFlare缓存规则</a><time datetime="2024-09-23T19:00:51.407Z" title="发表于 2024-09-24 03:00:51">2024-09-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/1269.html" title="99AI多功能可商用的AI网站搭建教程 基于NineAI二开"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/2024/08/30/117386k.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="99AI多功能可商用的AI网站搭建教程 基于NineAI二开"/></a><div class="content"><a class="title" href="/1269.html" title="99AI多功能可商用的AI网站搭建教程 基于NineAI二开">99AI多功能可商用的AI网站搭建教程 基于NineAI二开</a><time datetime="2024-08-30T14:55:46.795Z" title="发表于 2024-08-30 22:55:46">2024-08-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/1267.html" title="谷歌云GCP开通VPS并配置ssh连接教程 GCP玩机指南"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/2024/06/01/122rjfc.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="谷歌云GCP开通VPS并配置ssh连接教程 GCP玩机指南"/></a><div class="content"><a class="title" href="/1267.html" title="谷歌云GCP开通VPS并配置ssh连接教程 GCP玩机指南">谷歌云GCP开通VPS并配置ssh连接教程 GCP玩机指南</a><time datetime="2024-06-01T14:56:10.101Z" title="发表于 2024-06-01 22:56:10">2024-06-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/1265.html" title="最新谷歌云免信用卡获得150刀赠金方法"><img src= "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-lazy-src="https://pic.sky350.cn/images/2024/05/29/6yz4bq.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="最新谷歌云免信用卡获得150刀赠金方法"/></a><div class="content"><a class="title" href="/1265.html" title="最新谷歌云免信用卡获得150刀赠金方法">最新谷歌云免信用卡获得150刀赠金方法</a><time datetime="2024-05-28T20:31:47.065Z" title="发表于 2024-05-29 04:31:47">2024-05-29</time></div></div></div></div><div class="card-widget ads-wrap"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5201315122723978" data-ad-slot="7779019761" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({});</script></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2021 - 2024 By 阿宝哥呀</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">联系邮箱:[email protected]</div><!-- 自动翻译JS--><script src="https://cdn.staticfile.net/translate.js/3.5.1/translate.js"></script><script>translate.setAutoDiscriminateLocalLanguage();
translate.language.setLocal('chinese_simplified');
translate.selectLanguageTag.show = false;
translate.service.use('client.edge');
translate.execute();</script></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://pic.sky350.cn/js/lazyload.iife.min.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
endLoading: () => {
document.body.style.overflow = 'auto';
document.getElementById('loading-box').classList.add("loaded")
},
initLoading: () => {
document.body.style.overflow = '';
document.getElementById('loading-box').classList.remove("loaded")
}
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>(()=>{
const $countDom = document.getElementById('twikoo-count')
const init = () => {
twikoo.init(Object.assign({
el: '#twikoo-wrap',
envId: 'https://cm.sky350.com',
region: ''
}, null))
}
const getCount = () => {
twikoo.getCommentsCount({
envId: 'https://cm.sky350.com',
region: '',
urls: [window.location.pathname],
includeReply: false
}).then(function (res) {
$countDom.innerText = res[0].count
}).catch(function (err) {
console.error(err);
});
}
const loadTwikoo = (bool = false) => {
if (typeof twikoo === 'object') {
init()
bool && $countDom && setTimeout(getCount,0)
} else {
getScript('https://pic.sky350.cn/js/twikoo.all.min.js').then(()=> {
init()
bool && $countDom && setTimeout(getCount,0)
})
}
}
if ('Twikoo' === 'Twikoo' || !true) {
if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
else loadTwikoo(true)
} else {
window.loadOtherComment = () => {
loadTwikoo()
}
}
})()</script></div><script>window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[图片]') // replace image link
content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[链接]') // replace url
content = content.replace(/<pre><code>.*?<\/pre>/gi, '[代码]') // replace code
content = content.replace(/<[^>]+>/g,"") // remove html tag
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getComment = () => {
const runTwikoo = () => {
twikoo.getRecentComments({
envId: 'https://cm.sky350.com',
region: '',
pageSize: 5,
includeReply: true
}).then(function (res) {
const twikooArray = res.map(e => {
return {
'content': changeContent(e.comment),
'avatar': e.avatar,
'nick': e.nick,
'url': e.url + '#' + e.id,
'date': new Date(e.created).toISOString()
}
})
saveToLocal.set('twikoo-newest-comments', JSON.stringify(twikooArray), 10/(60*24))
generateHtml(twikooArray)
}).catch(function (err) {
const $dom = document.querySelector('#card-newest-comments .aside-lista')
$dom.innerHTML= "无法获取评论,请确认相关配置是否正确"
})
}
if (typeof twikoo === 'object') {
runTwikoo()
} else {
getScript('https://pic.sky350.cn/js/twikoo.all.min.js').then(runTwikoo)
}
}
const generateHtml = array => {
let result = ''
if (array.length) {
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (true) {
const name = 'data-lazy-src'
result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
} else {
result += '没有评论'
}
let $dom = document.querySelector('#card-newest-comments .aside-lista')
$dom.innerHTML= result
window.lazyLoadInstance && window.lazyLoadInstance.update()
window.pjax && window.pjax.refresh($dom)
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-lista')) {
const data = saveToLocal.get('twikoo-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getComment()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})</script><script defer="defer" id="ribbon" src="https://pic.sky350.cn/js/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="true"></script><script src="https://pic.sky350.cn/js/pjax.min.js"></script><script>let pjaxSelectors = [
'title',
'#config-diff',
'#body-wrap',
'#rightside-config-hide',
'#rightside-config-show',
'.js-pjax'
]
if (false) {
pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}
var pjax = new Pjax({
elements: 'a:not([target="_blank"])',
selectors: pjaxSelectors,
cacheBust: false,
analytics: true,
scrollRestoration: false
})
document.addEventListener('pjax:send', function () {
// removeEventListener scroll
window.removeEventListener('scroll', window.tocScrollFn)
window.removeEventListener('scroll', scrollCollect)
typeof preloader === 'object' && preloader.initLoading()
if (window.aplayers) {
for (let i = 0; i < window.aplayers.length; i++) {
if (!window.aplayers[i].options.fixed) {
window.aplayers[i].destroy()
}
}
}
typeof typed === 'object' && typed.destroy()
//reset readmode
const $bodyClassList = document.body.classList
$bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')
})
document.addEventListener('pjax:complete', function () {
window.refreshFn()
document.querySelectorAll('script[data-pjax]').forEach(item => {
const newScript = document.createElement('script')
const content = item.text || item.textContent || item.innerHTML || ""
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
newScript.appendChild(document.createTextNode(content))
item.parentNode.replaceChild(newScript, item)
})
GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()
typeof chatBtnFn === 'function' && chatBtnFn()
typeof panguInit === 'function' && panguInit()
// google analytics
typeof gtag === 'function' && gtag('config', 'G-VWC1BXX7W2', {'page_path': window.location.pathname});
// baidu analytics
typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
// Analytics
if (false) {
MtaH5.pgv()
}
// prismjs
typeof Prism === 'object' && Prism.highlightAll()
typeof preloader === 'object' && preloader.endLoading()
})
document.addEventListener('pjax:error', (e) => {
if (e.request.status === 404) {
pjax.loadUrl('/404.html')
}
})</script></div></body></html>