Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 2 #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
26 changes: 26 additions & 0 deletions .github/workflows/condom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Dcokerfile compilation'
on:
pull_request:
push:
branches:
- master

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Alice's condom
uses: alicesu55/[email protected]
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add csteps
git commit -m "Add changes" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
branch: compiled
github_token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM alpine:edge

ENV PORT 3000
ENV PASSWORD ChangeThis
ENV METHOD chacha20-ietf-poly1305
ENV PASSWORD password
ENV PV 1.3.1
ENV WSPATH="/ChangeThis"

ENV WSPATH="/posts.html"

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk update && apk add --no-cache shadowsocks-libev curl && \
curl -sL https://github.com/shadowsocks/v2ray-plugin/releases/download/v${PV}/v2ray-plugin-linux-amd64-v${PV}.tar.gz | tar zxC /usr/bin/ && \
chmod a+x /usr/bin/v2ray-plugin_linux_amd64
apk update && apk add --no-cache shadowsocks-libev && \
wget -c https://github.com/shadowsocks/v2ray-plugin/releases/download/v${PV}/v2ray-plugin-linux-amd64-v${PV}.tar.gz -O - | tar -xz -C /usr/bin/ && \
chmod +x /usr/bin/v2ray-plugin_linux_amd64

CMD ss-server -s 0.0.0.0 -p ${PORT} -k ${PASSWORD} -m $METHOD --plugin /usr/bin/v2ray-plugin_linux_amd64 --plugin-opts "server;path=${WSPATH}"
ADD start.sh /start.sh
RUN chmod +x /start.sh
CMD /start.sh
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

> 提醒: 滥用可能导致账户被BAN!!!

TIPS:
* 密码和加密方式以及PATH支持自定义
* 可使用v2ray-plugin+ss客户端,插件方式为websocket-tls,端口为443,PATH区分大小写
* 支持部署到kintohub等其它平台
> 提醒: 滥用可能导致账户被BAN!!!

### 部署Heroku空间

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

点击上面紫色`Deploy to Heroku`,会跳转到heroku app创建页面,填上app的名字、修改密码、加密方式、路径,当然用默认的也没问题。然后点击下面deploy创建APP,完成后会生成一个域名,到此服务端也就部署完成了。记下域名,后面客户端会用到。

### 部署Kintohub空间

点开 https://app.kintohub.com/ 新建一个APP,点击 Create Service ,然后创建 Web App;Improt URL填上本项目链接 ( https://github.com/moosetk/ys ) 和分支 compiled;Build Settings 项随便修改 Service Name;最后点击 Deploy 部署。部署成功会生成一个域名,记下域名,后面客户端会用到。

### 客户端配置

首先下载 v2ray-plugin 插件到电脑,下载解压后移动到常用文件夹,记住插件所在文件夹路径,待会会用到。

v2ray-plugin 插件下载页:https://github.com/shadowsocks/v2ray-plugin/releases

然后,下载ss客户端,比如[Windows客户端](https://github.com/shadowsocks/shadowsocks-windows/releases/),这个不多讲。配置如下:

* 服务器地址: shadowsocks-libev.herokuapp.com //此处填写服务端生成的域名
* 端口: 443
* 密码:password
* 加密:chacha20-ietf-poly1305
* 插件程序:D:\APP\v2ray-plugin_windows_amd64.exe //此处要填插件在电脑上的绝对路径
* 插件选项: path=/posts.html;host=shadowsocks-libev.herokuapp.com;tls //此处填上域名和路径

### Workers反代

```
addEventListener(
"fetch",event => {
let url=new URL(event.request.url);
url.hostname="shadowsocks-libev.herokuapp.com";
let request=new Request(url,event.request);
event. respondWith(
fetch(request)
)
}
)
```
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"env": {
"PASSWORD": {
"description": "shadowsocks-libev password",
"value": "ChangeThis"
"value": "password"
},
"METHOD": {
"description": "shadowsocks-libev method",
"value": "chacha20-ietf-poly1305"
},
"WSPATH": {
"description": "websocket path",
"value": "/ChangeThis"
"value": "/posts.html"
}
},
"website": "https://github.com/mixool/shadowsocks-libev",
Expand Down
3 changes: 0 additions & 3 deletions heroku.yml

This file was deleted.

3 changes: 3 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# run ss
ss-server -s 0.0.0.0 -p ${PORT} -k ${PASSWORD} -m chacha20-ietf-poly1305 --plugin /usr/bin/v2ray-plugin_linux_amd64 --plugin-opts "server;path=${WSPATH}"