-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
168 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release Go Binary for Linux (Multi-arch) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
TZ: Asia/Shanghai | ||
|
||
permissions: | ||
contents: write | ||
discussions: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: false | ||
go-version-file: go.mod | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ $RECYCLE.BIN/ | |
.idea | ||
docker-compose.yml | ||
uaProxy | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Make sure to check the documentation at https://goreleaser.com | ||
version: 2 | ||
|
||
env: | ||
- GIT_URL=https://github.com/huhu415/uaProxy | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- "386" | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- loong64 # 龙芯 | ||
- mips # 32位的大端序MIPS处理器 | ||
- mipsle # 32位的小端序MIPS处理器 | ||
- mips64 # 64位的大端序MIPS处理器 | ||
- mips64le # 64位的小端序MIPS处理器 | ||
- ppc64 # 64位的大端序PowerPC处理器 | ||
- ppc64le # 64位的小端序PowerPC处理器 | ||
- riscv64 | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -s -w | ||
- -X main.version={{ .Version }} | ||
- -X main.buildDate={{ .Date }} | ||
- -X main.gitCommit={{ .Commit }} | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE | ||
- README.md | ||
- FAQ.md | ||
- config.yaml | ||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
# https://goreleaser.com/customization/changelog/ | ||
changelog: | ||
disable: true | ||
|
||
# https://goreleaser.com/customization/release | ||
release: | ||
header: | | ||
### 🥳Changes | ||
第一版发布,基本功能完成,已经在寝室开始用3天了。 | ||
```sh | ||
tar -xzvf uaProxy-linux-xxxxxxx.tar.gz # 解压 | ||
``` | ||
footer: | | ||
**FAQ**: https://github.com/huhu415/uaProxy/blob/main/Release.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## ❓Questions | ||
|
||
### 如何选择Assets版本? | ||
|
||
- **386**: 32位的x86架构处理器 | ||
- **amd64**: 64位的x86架构处理器(也称为x86_64) | ||
- **arm**: 32位的ARM架构处理器 | ||
- **arm64**: 64位的ARM架构处理器(也称为AArch64) | ||
- **loong64**: 龙芯处理器的64位架构 | ||
- **mips**: 32位的大端序MIPS处理器 | ||
- **mipsle**: 32位的小端序MIPS处理器 | ||
- **mips64**: 64位的大端序MIPS处理器 | ||
- **mips64le**: 64位的小端序MIPS处理器 | ||
- **ppc64**: 64位的大端序PowerPC处理器 | ||
- **ppc64le**: 64位的小端序PowerPC处理器 | ||
|
||
> 注意, 所有Assets都是Linux版本的, darwin,windows,freebsd等等请自行编译 | ||
### 我是路由器, 选择哪个版本? | ||
|
||
先查一下自己的cpu的bits, 是32位还是64位的. _这就可以去掉一半了_ | ||
|
||
再看看是什么架构, 如果是硬路由, 比如ac2100这种, 一般都是`MIPS`类型的 | ||
- 如果是`MIPS`类型的, _那么就看看是大端序还是小端序的, 可以去问[ChatGpt](https://chatgpt.com)或者[kimi](https://kimi.moonshot.cn/chat/)_ | ||
- 如果不是, 那就是`ARM`或者`x86`的 | ||
|
||
### 校园网常见检测方式 | ||
- [x] TTL | ||
- ```sh | ||
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64 # 修改出口 TTL 为 64 | ||
``` | ||
- [x] 时间戳 | ||
- ```sh | ||
iptables -t nat -N ntp_force_local | ||
iptables -t nat -I PREROUTING -p udp --dport 123 -j ntp_force_local | ||
iptables -t nat -A ntp_force_local -d 0.0.0.0/8 -j RETURN | ||
iptables -t nat -A ntp_force_local -d 127.0.0.0/8 -j RETURN | ||
iptables -t nat -A ntp_force_local -d 192.168.0.0/16 -j RETURN | ||
iptables -t nat -A ntp_force_local -s 192.168.0.0/16 -j DNAT --to-destination 192.168.1.1 # 根据你路由器的地址修改 | ||
# 同时记得修改ntp服务器地址, 可以选ntp.aliyun.com, time1.cloud.tencent.com, time.ustc.edu.cn, cn.pool.ntp.org | ||
``` | ||
- [x] UA | ||
- [本项目](https://github.com/huhu415/uaProxy) | ||
- [ ] IP-ID | ||
- 一般学校好像不会检测这个, 以后再说 | ||
- [ ] DPI (可能暂时无解) | ||
- 可能要全局代理, 以后再说 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters