Srar / node-tap

基于TypeScript实现的开源SSTap
Apache License 2.0
681 stars 150 forks source link
shadowsocks sstap

node-tap

基于TypeScript实现的Tun2Shadowsocks. 目前可用于Windows平台.

实现特性

使用

1) 从Releases中下载已经打包完的版本.

Releases中版本均64位编译, 可能无法在32位平台使用. 2) 安装Win10Pcap或其他Pcap实现, 来用于UDP多倍发包. 如使用Npcap时安装页面Installation Opentions需要勾上Install Npcap in WinPcap API-compatible Mode. 3) 使用管理员权限cmd或powershell中在已以下命令运行node-sstap.

.\sstap.exe --host [ss host] --port [ss port] --passwd [ss password] --xtudp [x times] --method [ss method]

启动添加路由时出现对象已存在找不到元素为正常现象.

目前支持 rc4-md5, aes-256-cfb, aes-128-gcm, aes-192-gcm, aes-256-gcm 加密方式.

如果已经成功运行你应该会看到以下信息: snapshort.png

此时全部流量就全部转发到对应Shadowsocks服务器了.

框架图

snapshort.png

该图来源: http://blog.ucloud.cn/archives/3115

常见问题

Q: 启动过程中出现The specified module could not be found.

A: 重新安装npcap, 在Installation Opentions勾选Install Npcap in WinPcap API-compatible Mode.

Q: 启动过程中出现create ip forward entry result: ERROR code: 5.

A: 使用管理员权限运行.

Q: 目前是否支持不转发UDP?

A: 不支持.

Q: 参数内TCPUDP作用.

A: 参数内TCP/UDP参数是针对TCP/UDP不同协议跑不同SS服务器所设计的. 如果您不需要协议单独分流那么只需要指定host, port, passwd, method即可.

Q: Windows7启动后无效果.

A: 卸载npcap使用Win10Pcapwinpcap.

Q: 启动后无效果.

A: 检查系统内是否存在多个TAP虚拟网卡, 请只保留一个TAP虚拟网卡其余TAP虚拟网卡请卸载.

参考