Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
totravel committed Mar 5, 2022
1 parent 2479f4e commit f6427a1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![License](https://img.shields.io/github/license/totravel/shadowsocks-ws)
![GitHub last commit](https://img.shields.io/github/last-commit/totravel/shadowsocks-ws)

shadowsocks-ws 是基于 WebSocket 的 Shadowsocks,可以部署在 [Heroku][heroku] 等托管平台
shadowsocks-ws 是基于 WebSocket 的 Shadowsocks,可以部署在 [Heroku][heroku] 等平台

```
socks5 tcp websocket tcp
Expand All @@ -17,8 +17,8 @@ shadowsocks-ws 客户端只负责转发经过加密的流量,须配合 [Shadow
## 环境要求

- [Node.js](https://nodejs.dev/) 16.13.2+
- [Git for Windows](https://gitforwindows.org/)
- [Windows Terminal](https://github.com/microsoft/terminal)
- [Git for Windows](https://gitforwindows.org/)

## 部署

Expand All @@ -44,7 +44,7 @@ $ npm i

```json
{
"dns": "https://cloudflare-dns.com/dns-query",
"dns": "https://doh.pub/dns-query",
"remote_address": "https://*.example.com/",
"remote_port": 80,
"local_address": "127.0.0.1",
Expand All @@ -60,6 +60,7 @@ $ npm i
- DNSPod `https://doh.pub/dns-query`
- AliDNS `https://dns.alidns.com/resolve`
- 360DNS `https://doh.360.cn/query`
- Cloudflare `https://cloudflare-dns.com/dns-query`

启动 shadowsocks-ws 客户端:

Expand Down Expand Up @@ -116,20 +117,20 @@ rules:

```shell
$ ./ruleset.sh
dowloading reject.yaml...
dowloading icloud.yaml...
dowloading apple.yaml...
dowloading google.yaml...
dowloading proxy.yaml...
dowloading direct.yaml...
dowloading private.yaml...
dowloading gfw.yaml...
dowloading greatfire.yaml...
dowloading tld-not-cn.yaml...
dowloading telegramcidr.yaml...
dowloading cncidr.yaml...
dowloading lancidr.yaml...
dowloading applications.yaml...
downloading reject.yaml...
downloading icloud.yaml...
downloading apple.yaml...
downloading google.yaml...
downloading proxy.yaml...
downloading direct.yaml...
downloading private.yaml...
downloading gfw.yaml...
downloading greatfire.yaml...
downloading tld-not-cn.yaml...
downloading telegramcidr.yaml...
downloading cncidr.yaml...
downloading lancidr.yaml...
downloading applications.yaml...
```

使用规则集的配置文件的模板为 `blacklist.yaml.example` 或 `whitelist.yaml.example`。
Expand Down
4 changes: 2 additions & 2 deletions config.json.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

"dns": "https://cloudflare-dns.com/dns-query",
{
"dns": "https://doh.pub/dns-query",
"remote_address": "https://*.example.com/",
"remote_port": 80,
"local_address": "127.0.0.1",
Expand Down
9 changes: 7 additions & 2 deletions ruleset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ files=(

url=https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/

if [ ! -d ~/.config/clash ]; then
echo requires clash installed.
exit 1
fi

if [ ! -d ~/.config/clash/ruleset ]; then
mkdir ~/.config/clash/ruleset
fi

for file in ${files[@]}; do
echo dowloading ${file}.yaml...
echo downloading ${file}.yaml...
curl ${url}${file}.txt \
-s -k \
-s -S -k \
-x socks5h://127.0.0.1:7890 \
-o ~/.config/clash/ruleset/${file}.yaml
done

0 comments on commit f6427a1

Please sign in to comment.