-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
333 lines (214 loc) · 9.92 KB
/
index.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>YoungSun's Blog</title>
<meta name="author" content="Young Sun">
<meta name="description" content="fighting with the boring World!">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:site_name" content="YoungSun's Blog"/>
<meta property="og:image" content="undefined"/>
<link href="/favicon.ico" rel="icon">
<link rel="stylesheet" href="/css/bootstrap.min.css" media="screen" type="text/css">
<link rel="stylesheet" href="/css/font-awesome.css" media="screen" type="text/css">
<link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">
<link rel="stylesheet" href="/css/highlight.css" media="screen" type="text/css">
<link rel="stylesheet" href="/css/google-fonts.css" media="screen" type="text/css">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script src="/js/jquery-2.0.3.min.js"></script>
<!-- analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-69870867-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<nav id="main-nav" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<button type="button" class="navbar-header navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">YoungSun's Blog</a>
<div class="collapse navbar-collapse nav-menu">
<ul class="nav navbar-nav">
<li>
<a href="/archives" title="All the articles.">
<i class="fa fa-archive"></i>Archives
</a>
</li>
<li>
<a href="/categories" title="All the categories.">
<i class="fa fa-folder"></i>Categories
</a>
</li>
<li>
<a href="/tags" title="All the tags.">
<i class="fa fa-tags"></i>Tags
</a>
</li>
<li>
<a href="/about" title="About me.">
<i class="fa fa-user"></i>About
</a>
</li>
</ul>
</div>
</div> <!-- container -->
</nav>
<div class="clearfix"></div>
<div class="container">
<div class="content">
<div class="page-header">
<h1>和无聊得世界死磕!</h1>
</div>
<div class="row page">
<div class="col-md-9">
<div class="slogan">
<i class="fa fa-heart"></i>
Fighting With The Boring World!
</div>
<div class="mypage">
<!-- title and entry -->
<!-- display as entry -->
<h3 class="title">
<div class="date"> 8月 31 2015 </div>
<div class="article-title"><a href="/2015/08/31/access-gfw/" title="Across the Great Wall we can reach every corner in the world.">自制梯子,VPS 搭建 ShadwSocks 服务全攻略</a></div>
</h3>
<div class="entry">
<div class="row">
<div class="col-md-8">
<h2 id="前言">前言</h2>
<p><code>Shadowsocks</code>是一个轻量级<code>socks5</code>代理,通过客户端以指定的密码、加密方式和端口连接服务器,成功连接到服务器后,客户端在用户的电脑上构建一个本地<code>socks5</code>代理。使用时将流量分到本地<code>socks5</code>代理,客户端将自动加密并转发流量到服务器,服务器以同样的加密方式将流量回传给客户端,以此实现代理上网。与<code>VPN</code>相比有以下优点。</p>
<ul>
<li>快速(异步I/O和事件驱动程序)</li>
<li>安全(所有的流量都经过加密算法加密,支持自定义算法)</li>
</ul>
</div>
<div class="col-md-4">
<div class="thumbnail"><a href="/2015/08/31/access-gfw/"><img src="/img/tizi.jpg" alt="自制梯子,VPS 搭建 ShadwSocks 服务全攻略" class="nofancybox"></a></div>
</div>
</div>
<a type="button" href="/2015/08/31/access-gfw/#more" class="btn btn-default more">阅读此文</a>
</div>
<!-- display as entry -->
<h3 class="title">
<div class="date"> 8月 29 2015 </div>
<div class="article-title"><a href="/2015/08/29/linux_setup/" title="从零开始设置一台 Linux VPS。">VPS 开荒指南</a></div>
</h3>
<div class="entry">
<div class="row">
<div class="col-md-8">
<h2 id="1_系统环境">1 系统环境</h2>
<p>从哪个发行版入手这里我们不多做讨论,这里我们选择<code>Ubuntu 14.04 LTS</code>,优点是软件比较新,用的人多,任何问题<code>google</code>一下马上就有答案。本教程客户机部分适用于 <code>Linux</code> 和<code>Mac</code>。</p>
<h3 id="1-1_创建用户">1.1 创建用户</h3>
<p>首先通过 VPS 的web 管理工具 root 登录,然后创建一个用户组 <code>admin</code></p>
<figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="preprocessor">#更新下软件包</span></div><div class="line">sudo apt-<span class="keyword">get</span> update</div><div class="line">sudo apt-<span class="keyword">get</span> upgrade</div><div class="line"><span class="preprocessor">#添加用户</span></div><div class="line">addgroup admin</div></pre></td></tr></table></figure>
<!--more-->
<p>然后,添加一个新用户 <code>username</code></p>
<figure class="highlight dash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">useradd <span class="operator">-d</span> /home/username <span class="operator">-s</span> /bin/bash -m username</div></pre></td></tr></table></figure>
<p>上面命令中,参数<code>d</code>指定用户的主目录,参数<code>s</code>指定用户的<code>shell</code>,参数<code>m</code>表示如果该目录不存在,则创建该目录。</p>
<p>接着,设置新用户的密码。</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="title">passwd</span> username</div></pre></td></tr></table></figure>
</div>
<div class="col-md-4">
<div class="thumbnail"><a href="/2015/08/29/linux_setup/"><img src="/img/sever.jpg" alt="VPS 开荒指南" class="nofancybox"></a></div>
</div>
</div>
<a type="button" href="/2015/08/29/linux_setup/#more" class="btn btn-default more">阅读此文</a>
</div>
</div>
<!-- pagination -->
<div>
<center>
<div class="pagination">
<ul class="pagination">
</ul>
</div>
</center>
</div>
</div> <!-- col-md-9 -->
<div class="col-md-3">
<div id="sidebar">
<div class="form-group has-success has-feedback">
<form action="//google.com/search" method="get" accept-charset="utf-8" >
<input type="search" name="q" results="0" placeholder="搜索" class="form-control">
<input type="hidden" name="q" value="site:sunyang.cc">
</form>
</div>
<div class="widget">
<h4>分类</h4>
<ul class="tag_box inline list-unstyled">
<li><a href="/categories/tutorial/">tutorial<span>2</span></a></li>
</ul>
</div>
<div class="widget">
<h4>标签云</h4>
<ul class="tag_box inline list-unstyled">
<li><a href="/tags/ShadwSocks/">ShadwSocks<span>1</span></a></li>
<li><a href="/tags/Linux/">Linux<span>1</span></a></li>
</ul>
</div>
<div class="widget">
<h4>最新文章</h4>
<ul class="entry list-unstyled">
<li>
<a href="/2015/08/31/access-gfw/" title="Across the Great Wall we can reach every corner in the world." ><i class="fa fa-file-o"></i>自制梯子,VPS 搭建 ShadwSocks 服务全攻略</a>
</li>
<li>
<a href="/2015/08/29/linux_setup/" title="从零开始设置一台 Linux VPS。" ><i class="fa fa-file-o"></i>VPS 开荒指南</a>
</li>
</ul>
</div>
<div class="widget">
<h4>链接</h4>
<ul class="blogroll list-unstyled">
<li><i class="fa fa-github"></i><a href="http://www.github.com/sunocean" title="My Github account." target="_blank"]);">My Github</a></li>
<li><i class="fa fa-rocket"></i><a href="https://hub.docker.com/u/sunyang/" title="My Docker account." target="_blank"]);">My Docker</a></li>
</ul>
</div>
</div> <!-- sidebar -->
</div> <!-- col-md-3 -->
</div> <!-- row-fluid -->
</div>
</div>
<div class="container-narrow">
<footer> <p>
© 2015 Young Sun
with help from <a href="http://zespia.tw/hexo/" target="_blank">Hexo</a> and <a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a>. Theme by <a href="http://github.com/wzpan/hexo-theme-freemind/">Freemind</a>.
</p> </footer>
</div> <!-- container-narrow -->
<a id="gotop" href="#">
<span>▲</span>
</a>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/main.js"></script>
<script type="text/javascript">
var disqus_shortname = 'sunyang';
(function(){
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
$('.fancybox').fancybox();
})(jQuery);
</script>
</body>
</html>