这是一个源于 trojan-gfw 的OpenBSD预编译版本,以及一个运行需要的rc.d 简单脚本,仅仅能保证服务运行!
trojan-openbsd-x86_64 是 openbsd 7.1 的预编译可执行文件
- Download files
- cp (bin file) to dir /usr/bin/
mkdir /etc/trojan
- create your trojan config file
cp trojan to /etc/rc.d
chmod +x /etc/rc.d/trojan
rcctl enable trojan
#boot enable your trojan servicercctl start trojan
#start your trojan service
-
first download source
wget https://github.com/trojan-gfw/trojan/archive/refs/tags/v1.16.0.zip
-
install Dependencies lib
pkg_add boost cmake openssl
-
configure cmake
cmake -DCMAKE_INSTALL_PREFIX=/usr/bin/trojan \ -DOPENSSL_ROOT_DIR=/usr/local \ -DOPENSSL_INCLUDE_DIR=/usr/local/include \ -DOPENSSL_SSL_LIBRARY=/usr/lib/libssl.so.52.0 \ -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so.50.0 \ -DENABLE_MYSQL=OFF \ --trace --debug-output
ps: without mysql support
-
make
make install
or
make
&&cp trojan /usr/bin
-
mkdir /etc/trojan
-
config trojan
-
done