Giter VIP home page Giter VIP logo

xray-heroku's Introduction

Shadowsocks over WebSocket

Build Status License GitHub last commit

shadowsocks-ws 是基于 WebSocket 的 Shadowsocks,可以部署在 Heroku

        socks5            tcp               websocket                tcp
client <------> ss-local <---> ss-ws-local <-- gfw --> ss-ws-remote <---> target
                encrypt                                decrypt

shadowsocks-ws 的客户端只负责转发经过加密的流量,须配合现有 Shadowsocks 客户端 使用。shadowsocks-ws 的客户端和服务器端之间使用 WebSocket 协议进行通信。shadowsocks-ws 的服务器端对外表现为一个 Web 服务器,可以用浏览器访问。

环境要求

依赖项

部署到 Heroku

一键部署

点击下面的按钮并根据提示操作。

Deploy

手动部署

打开终端,登录你的 Heroku 账户:

$ heroku auth:login -i
heroku: Enter your login credentials
Email: [email protected]
Password: *****
Logged in as [email protected]

将你的 SSH 公钥添加到 Heroku:

$ heroku keys:add
Found an SSH public key at /path/to/id_rsa.pub
? Would you like to upload it to Heroku? (Y/n) y

新建一个 APP:

$ heroku create
Creating app... done, ⬢ xxxxx
https://<your-app>.herokuapp.com/ | https://git.heroku.com/<your-app>.git

设置加密方法、密码:

$ heroku config:set METHOD="chacha20-ietf-poly1305" PASS="your-password" --app <your-app>

仅支持 chacha20-ietf-poly1305aes-256-gcm 两种加密方法。

克隆代码到本地,再推送到 APP:

$ git clone https://github.com/totravel/shadowsocks-ws.git
$ cd shadowsocks-ws
$ git push https://git.heroku.com/<your-app>.git master

本地配置

克隆代码到本地,安装依赖项:

$ git clone https://github.com/totravel/shadowsocks-ws.git
$ cd shadowsocks-ws
$ npm i

将配置文件 config.json.example 重命名为 config.json 并修改 remote_addresspasswordmethod 三个字段。

{
    "verbose": false,
    "dns": "https://cloudflare-dns.com/dns-query",
    "remote_address": "ws://<your-app>.herokuapp.com/",
    "remote_port": 80,
    "local_address": "127.0.0.1",
    "local_port": 8787,
    "timeout": 5000,
    "password": "your-password",
    "method": "chacha20-ietf-poly1305"
}

remote_address 字段的开头也可修改为 wss://

dns 字段一般无须修改。下列取值供参考:

  • DNSPod https://doh.pub/dns-query
  • AliDNS https://dns.alidns.com/resolve
  • 360DNS https://doh.360.cn/query

开始使用

双击 setup.cmd 即可启动服务:

loading...
ss://...
resolving...
trying...
using ... used ...
server has started
have a good time!

首次使用,须完成下列操作:

  • 复制开头的 ss://...
  • 在托盘区找到 Shadowsocks 客户端的图标 > 右击
    • 服务器 > 从剪贴板导入 URL
    • 系统代理 > PAC 模式

此后每次使用只须运行 setup.cmd 和 Shadowsocks 客户端即可。

许可协议

The MIT License (MIT)

xray-heroku's People

Contributors

ose09 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.