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

Update documents, update theme of the document website #19

Merged
merged 5 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ See more about wssocks: https://github.com/genshen/wssocks.
## Clients
The available clients for different platforms are list as follows:
- cli: command line client.
- client-ui: From v0.5.0, we also provide GUI [client](client-ui).
- client-ui: From v0.5.0, we also provide a GUI [client](client-ui) for windows and macos.
- swiftui-client: From v0.6.0 and v0.7.0, we also provide a mac native app (build using swiftui). You cn download the app in release page (filename: `wssocks-ustb-client-macOS-*.app.zip`).

Note: **wssocks** and wssocks-plugin-ustb plugin are all included in both cli and client-ui clients.

**Screenshots**:
| | cli | client-ui | swiftui-client |
| -- | -- | --- | ------ |
| Screenshots | - | ![client ui](./docs/zh-cn/resource/client.webp) | ![swiftui](./docs/zh-cn/resource/macos-client.webp) |
| Description | command line app for all platforms. | universal GUI client based on [fyne](https://fyne.io) cross platform toolkit. | macOS native client build using swiftUI. |
| Supported Platforms | Windows x64, macOS x64/arm64, Linux x64/arm64 | Windows x64, macOS x64/arm64 | macOS x64/arm64 |

### install cli client
```bash
go get -u github.com/genshen/wssocks-plugin-ustb/wssocks-ustb
Expand Down
2 changes: 1 addition & 1 deletion client-ui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const (
AppId = "wssocks-ustb.genshen.github.com"
CoreGithubRepoUrl = "https://github.com/genshen/wssocks"
GithubRepoUrl = "https://github.com/genshen/wssocks-plugin-ustb"
DocumentUrl = "https://github.com/genshen/wssocks-plugin-ustb/blob/master/docs/zh-cn/README.md"
DocumentUrl = "https://genshen.github.io/wssocks-plugin-ustb/"
)

const (
Expand Down
20 changes: 17 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,35 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
</head>
<body>
<div id="app">Loading...</div>
<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script>
<script>
window.$docsify = {
name: 'wssocks-plugin-ustb',
repo: 'https://github.com/genshen/wssocks-plugin-ustb',
themeColor: '#f66',
loadSidebar: true,
subMaxLevel: 2,
plugins: [
EditOnGithubPlugin.create(
'https://github.com/genshen/wssocks-plugin-ustb/tree/master/docs/',
null,
function(file) {
if (file.indexOf('en') === -1) {
return '编辑'
} else {
return 'edit on github'
}
}
)
]
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
</body>
</html>
16 changes: 14 additions & 2 deletions docs/zh-cn/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,27 @@ GIT_SSH_COMMAND="ssh -o ProxyCommand='nc -x 127.0.0.1:1080 %h %p' " git clone ss
GIT_SSH_COMMAND="ssh -o ProxyCommand='connect -S 127.0.0.1:1080 %h %p' " git clone ssh://git@git.hpcer.dev:2222/cli/cli.git
```

## git-lfs (macos)
wssocks-ustb 客户端需要开启 http/https 代理。
适用于 lfs 数据通过 https/http 协议传输的情况。

```bash
# macos
export https_proxy=http://127.0.0.1:1080 http_proxy=http://127.0.0.1:1086
git push
```

## HTTP/HTTPS 协议访问
wssocks-ustb 客户端需要开启 http/https 代理。
这里全局配置 https://git.hpcer.dev 域名下的所有仓库都通过代理访问,https 代理服务器的地址为 http://127.0.0.1:1080 (与 wssocks-ustb的 socsk5 address 一致)。
```

```bash
git config --global http.https://git.hpcer.dev.proxy http://127.0.0.1:1080
git clone https://git.hpcer.dev/genshen/my-project.git
```
注意,如果你的服务器只支持 http 协议,git 的配置的 http 代理服务器地址改为 http://127.0.0.1:1086 (与wssocks-ustb的 htt(s) address 一致):
```

```bash
git config --global http.http://git.hpcer.dev.proxy http://127.0.0.1:1086
```

Expand Down
Binary file modified docs/zh-cn/resource/macos-client.webp
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/zh-cn/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ssh -o ProxyCommand='connect -S 127.0.0.1:1080 %h %p' user@ssh.hpcer.dev
```
`user@ssh.hpcer.dev` 替换为你需要连接的目标服务器用户和地址,`127.0.0.1:1080` 为前面 wssocks-ustb 客户端配置的 SOCKS5 监听地址和端口。

!> 建议 windows 用户 connect.exe 的路径用完整的绝对路径,因为直接用 `connect -S 127.0.0.1:1080 %h %p` 在部分 windows 上可能会出现连接失败的问题。

### 其他 shell 客户端
其他平台上的一些 shell 客户端(如xshell),也可对ssh连接进行 socks5 代理配置。
具体参见相关配置文档,主要配置内容是设置连接的代理类型为 SOSCK5,且设置 socks5 服务器地址为 wssocks-ustb 客户端对应的 "socks5 address"(如 `127.0.0.1:1080`)。
2 changes: 1 addition & 1 deletion swiftui-client/wssocks-ustb-client/menu/MenuBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct MenuBarView: View {
.aspectRatio(contentMode: .fit)
.foregroundColor(wssocksStatus==0 ? Color.primary: Color.accentColor)
.padding((wssocksStatus == 1 && clickI % 5 == 4) ? 12: 24)
.symbolRenderingMode(.multicolor)
.symbolRenderingMode((wssocksStatus == 1 && clickI % 5 == 4) ? .multicolor: .hierarchical)
}.buttonStyle(PlainButtonStyle())
if wssocksStatus == 1 && clickI % 5 == 4 {
Text("Oh! This is an easter egg!")
Expand Down
Loading