2016-05-05-lightsword安装中遇到的坑

2016-05-05-lightsword安装中遇到的坑

lightsword是一个基于 Node.js 的 SOCKS5 代理 / Apple NE 服务器。LightSword 参考了 Shadowsocks 的协议,并用 Typescript 实现。想必大家已经知道这货是干嘛的了。项目的主页在这里:https://github.com/UnsignedInt8/LightSword 。

之前看到一篇介绍lightsword的文章,刚好上午没啥事,我就折腾了一下,遇到两个坑,这里说一下。

1.服务器
我服务器用的是ubuntu, 作者提供了一个一键安装脚本.
curl -sL https://raw.githubusercontent.com/UnsignedInt8/LightSword/master/misc/onekey_ubuntu.sh | bash –
但是这个脚本执行会报错,我直接打开那个脚本,里面内容是
#!/bin/bash
apt-get update -y
apt-get install curl -y
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash –
apt-get install -y nodejs
npm install lightsword -g
我直接在前面加一个sudo,就ok了。所以正确命令应该是
curl -sL https://raw.githubusercontent.com/UnsignedInt8/LightSword/master/misc/onekey_ubuntu.sh | sudo -E bash –
安装完成之后执行
lsserver -f -m aes-256-cfb -p 4433 -k your_password
就ok了。

2.本地
我本地是mac, 直接brew install node && npm install lightsword -g就安装好了。
我看到https://github.com/UnsignedInt8/LightSword/tree/master/client 这里有一个json文件,我就执行了lslocal -c config.json, 结果报错,我仔细一看作者提供的那个json文件里面倒数第二行是
“dontbypasslocal”, false
坑爹,这里面应该是
”dontbypasslocal”: false,
改正之后重新执行
lslocal -c config.json
就没有问题了。
后来我又仔细看了一下lsserver和lslocal的manual, 其时本地也不需要config.json文件, 直接执行
lslocal -f -m aes-256-cfb -s your_host_ip -p 4433 -k your_password -l 1081
就ok了。其中的your_host_ip填你自己的服务器的ip地址,your_password填你的密码。

就这样,lightsword就可以了,万一shaowsocks挂了,你还可以用这个做备用方案。


已发布

分类

来自

标签:

评论

发表回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据