Giter Club home page Giter Club logo

openbsd_trojan's Introduction

OpenBSD_Trojan

这是一个源于 trojan-gfw 的OpenBSD预编译版本,以及一个运行需要的rc.d 简单脚本,仅仅能保证服务运行!

trojan-openbsd-x86_64 是 openbsd 7.1 的预编译可执行文件

使用说明

由于 OpenBSD 更新7.2,所以更新预编译文件

  1. Download files
  2. cp (bin file) to dir /usr/bin/
  3. mkdir /etc/trojan
  4. create your trojan config file
  5. cp trojan to /etc/rc.d
  6. chmod +x /etc/rc.d/trojan
  7. rcctl enable trojan #boot enable your trojan service
  8. rcctl start trojan #start your trojan service

OpenBSD 7.2 building progress

  1. first download source

    wget https://github.com/trojan-gfw/trojan/archive/refs/tags/v1.16.0.zip

  2. install Dependencies lib

    pkg_add boost cmake openssl

  3. 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

  4. make

    make install

    or

    make && cp trojan /usr/bin

  5. mkdir /etc/trojan

  6. config trojan

  7. done

test config some fix

openbsd_trojan's People

Contributors

littlesum avatar

Stargazers

 avatar  avatar

Watchers

 avatar

openbsd_trojan's Issues

[Solved]fatal: /usr/bin/trojan/etc/trojan/config.json: cannot open file

安裝之后运行trojan 报错 cannot open file

Welcome to trojan 1.16.0
[2022-12-29 12:50:46] [FATAL] fatal: /usr/bin/trojan/etc/trojan/config.json: cannot open file
[2022-12-29 12:50:46] [FATAL] exiting. . .

运行 trojan -h,显示默认配置路径是一个诡异的不存在的路径

Welcome to trojan 1.16.0
usage: trojan [-htv] [-l LOG] [-k KEYLOG] [[-c] CONFIG]
options:
  -c [ --config ] CONFIG (=/usr/bin/trojan/etc/trojan/config.json)
                                        specify config file
  -h [ --help ]                         print help message
  -k [ --keylog ] KEYLOG                specify keylog file location (OpenSSL
                                        >= 1.1.1)
  -l [ --log ] LOG                      specify log file location
  -t [ --test ]                         test config file
  -v [ --version ]                      print version and build info

trojan -c /etc/trojan/config.json 手动指定配置路径,运行报错

EDIT: 手动指定 trojan -c /etc/trojan/config.jsontrojan /etc/trojan/config.json 后可以成功运行

EDIT2: 但是 rcctl -d start trojan 会报错

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.