phlinhng

Results 21 comments of phlinhng

My solution is to build my own alpine-based docker containers . ``` FROM alpine:latest ARG plugins=tls.dns.cloudflare RUN apk add --no-cache curl libcap RUN curl --silent --show-error --fail --location --header "Accept:...

我寫了一個 trojan-go 的部署腳本,供你參考。 https://github.com/phlinhng/v2ray-tcp-tls-web/blob/master/tj.sh

你可以看一下我那個腳本內的 `get_trojan()` 函數,應該就是你要的核心功能了。寫成腳本如下。https://gist.github.com/phlinhng/2a5e3993dee736c7264594528d3acce2 ```sh #!/bin/sh echo "Getting the latest version of trojan-go" latest_version="$(wget --no-check-certificate -qO- https://api.github.com/repos/p4gefau1t/trojan-go/tags | grep 'name' | cut -d\" -f4 | head -1)" echo "${latest_version}" trojango_link="https://github.com/p4gefau1t/trojan-go/releases/download/${latest_version}/trojan-go-linux-amd64.zip" mkdir...

> 另外顺便问个问题,就是关于`.service`文件的问题。我之前一直以为默认放到`/usr/lib/systemd/system/`里,当`systemctl enable xxxx`的时候,才创建软链到`/etc/systemd/system/`,但是现在我看你这里却是反过来的,不只你,还有v2ray也是,然而我看一般比较官方的软件,却是像我说的那样的,比如docker,现在我去看我VPS的`/usr/lib/systemd/system/`和`/etc/systemd/system/`文件夹,各自都有非软链接文件,但同时也都有软链接文件,但其实这两种方式都能正常用,都会在enable的时候创建软链到另一个目录中,但不知道比较标准的是哪种? @xiebruce 這是個好問題,我之前也沒想過。我猜 `systemctl enable [something]` 的邏輯是,只要其中一個目錄沒有對應檔案,就創建一個軟鏈接到另一個目錄裡。 找到一個[解釋](https://unix.stackexchange.com/questions/206315/whats-the-difference-between-usr-lib-systemd-system-and-etc-systemd-system)說,系統包管理器安裝的服務會優先放到 `/usr/lib/systemd/system/` 裡,用戶自己創建的服務通常放到 `/etc/systemd/system/` 裡來和包管理器安裝的服務區隔。 > Basically, files that ships in packages downloaded from distribution repository go into /usr/lib/systemd/. Modifications...

既然作者說了,我就響應作者號召,也分享下我的 trojan-go 腳本。 1. [**Trojan-go quickstart**](https://gist.github.com/phlinhng/2a5e3993dee736c7264594528d3acce2) 就是上面分享過的,仿造 trojan-quickstart 的 Trojan-go 最小化**安裝**腳本 2. [**Trojan-go 自動部署**](https://github.com/phlinhng/v2ray-tcp-tls-web/blob/master/tj.sh) 自動獲取 Trojan-go + 自動獲取證書 + 自動設置證書更新排程。相當於可以自動申請證書的 Trojan-go quickstart。不含任何 Web 服務器,為 Trojan-go 最小化**部署**腳本 ( 因最近空閒時間較少緣故未測試過此腳本,歡迎各路大佬協助完善 ) ```sh...

@wangfeng35 trojan-go 理论上应该要随着 systemd 开机自启的。启动失败的原因是脚本用的 0.6.0 格式配置文件和 0.7.x 不合,还在修复中。感谢您的支持!

> I personally suggest that we use a different scheme name in some cases, for example, `trojan-go`, since trojan-go ws is not compatible with trojan-gfw clients. Since trojan-go can still...

I just realised that `peer` stand for an argument as "tls server name". I've made a stupid mistake. It's fixed in the original topic now.

> 发一个qt5现在版本用的格式,openwrt ssr plus、shadowrocket 也能用(小火箭能正确识别mux=1 > trojan://[password]@[serverdomain]:[port]?allowinsecure=0&tfo=0&sni=&mux=1&ws=0&wss=0&wsPath=&wsHostname=&wsObfsPassword=&group=#[groupname] can `sni` be identified in Shadowrocket ? since shadowrocket use self-defined keyword `peer` to represent `sni`, it will be better if the standard...

回落到 nginx 再用 `split_clients` 去轉發不是很簡單嗎 你的需求應該是 web 服務器 / Load Balancer 的工作,Trojan-Go 不是幹這個的