Implementation of the new generation of HTTP User-Agent modification methodology.
Go to file
2023-12-04 21:34:23 +08:00
release chore: update release 2023-12-04 21:34:23 +08:00
.gitignore chore: release repo 2023-12-04 19:25:08 +08:00
build.sh feat: support lru cache 2023-12-04 18:23:13 +08:00
example.yaml hello world 2023-12-03 15:39:45 +08:00
go.mod feat: support lru cache 2023-12-04 18:23:13 +08:00
go.sum feat: support lru cache 2023-12-04 18:23:13 +08:00
http.go feat: log host 2023-12-03 22:07:59 +08:00
LICENSE hello world 2023-12-03 15:39:45 +08:00
main.go chore: update release 2023-12-04 21:34:23 +08:00
README.md chore: bump version to 0.0.3 2023-12-04 01:12:59 +08:00
ua3f.service fix: ua3f.service 2023-12-04 14:44:10 +08:00

UA3F

UA3F 是新一代 HTTP User-Agent 修改方法,对外作为一个 SOCK5 服务,可以部署在路由器等设备等设备进行透明 UA 修改。

UA3F

部署

Release 页面已经提供常见架构的编译版本,可以根据自己架构下载并解压到路由器等设备上。

使用

参数:

  • -p <port>: 端口号,默认 1080
  • -f <UA>: 自定义 UA默认 FFF
  • -b <bind addr>: 自定义绑定监听地址,默认 127.0.0.1

手动启动

ua3f -p <port> -f <UA> -b <bind addr>

作为后台服务运行

ua3f 置于 /root/ua3f

ua3f.service 置于 /etc/init.d/ua3f.service

执行下面的命令:

chmod +x /etc/init.d/ua3f.service
service ua3f.service enable
service ua3f.service start

Clash 的配置建议

请确保 PROCESS-NAME,ua3f,DIRECT 置于规则列表顶部。

可以在 PROCESS-NAME,ua3f,DIRECTMATCH,ua3f 之间按需加入自定义加密代理规则。如果上述 2 条规则之间加入 DIRECT 规则,请确保匹配该规则的流量属于非 HTTP 协议流量

请不要将从 Release 下载解压得到的 ua3f 二进制文件修改名称, 如需修改,则需要在 PROCESS-NAME,ua3f,DIRECT 中修改相应的名称。

proxies:
  - name: "ua3f"
    type: socks5
    server: 127.0.0.1
    port: 1080
    url: http://connectivitycheck.platform.hicloud.com/generate_204

rules:
  - PROCESS-NAME,ua3f,DIRECT
  - MATCH,ua3f

Roadmap

  • 性能提升,降低 CPU 占用,降低内存占用
  • 优化部署流程
  • 支持 IPv6
  • 支持 SOCK5 Auth