Created attachment 214158 [details] shar file Trojan An unidentifiable mechanism that helps you bypass GFW.
Generally it looks good, but you may wan to use portlint (ports-mgmt/portlint) to fix some style issues.
Comment on attachment 214158 [details] shar file # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # trojan # trojan/Makefile # trojan/distinfo # trojan/pkg-descr # trojan/pkg-plist # trojan/trojan.shar # trojan/files # trojan/files/trojan.in # echo c - trojan mkdir -p trojan > /dev/null 2>&1 echo x - trojan/Makefile sed 's/^X//' >trojan/Makefile << '244bfb9783ec4228b921f4941af38f3c' X# $FreeBSD$ X XPORTNAME= trojan XDISTVERSIONPREFIX= v XDISTVERSION= 1.15.1 XCATEGORIES= net XMASTER_SITES= X XMAINTAINER= bhy1924@gmail.com XCOMMENT= Unidentifiable mechanism that helps you bypass GFW X XLICENSE= GPLv3 XLICENSE_FILE= ${WRKSRC}/LICENSE X XLIB_DEPENDS= libboost_system.so:devel/boost-libs X XUSES= cmake compiler:c11 ssl X XUSE_RC_SUBR= trojan X XCMAKE_OFF= ENABLE_MYSQL X XUSE_GITHUB= yes XGH_ACCOUNT= trojan-gfw X XOPTIONS_DEFINE= DOCS XOPTIONS_SUB= yes X X.include <bsd.port.mk> 244bfb9783ec4228b921f4941af38f3c echo x - trojan/distinfo sed 's/^X//' >trojan/distinfo << 'b1e61ed2f07581e8aaa449ab39d52fee' XTIMESTAMP = 1588663340 XSHA256 (trojan-gfw-trojan-v1.15.1_GH0.tar.gz) = ab5ed59573085e69164dce677656951d502ee6cdf0890137f6868da7af3c0ffd XSIZE (trojan-gfw-trojan-v1.15.1_GH0.tar.gz) = 48121 b1e61ed2f07581e8aaa449ab39d52fee echo x - trojan/pkg-descr sed 's/^X//' >trojan/pkg-descr << '235227292b2ee518327f25e12c03ada7' XAn unidentifiable mechanism that helps you bypass GFW. X XTrojan features multiple protocols over TLS to avoid both active/passive Xdetections and ISP QoS limitations. X XTrojan is not a fixed program or protocol. It's an idea, an idea that imitating Xthe most common service, to an extent that it behaves identically, could help Xyou get across the Great FireWall permanently, without being identified ever. XWe are the GreatER Fire; we ship Trojan Horses. X XWWW: https://github.com/trojan-gfw/trojan 235227292b2ee518327f25e12c03ada7 echo x - trojan/pkg-plist sed 's/^X//' >trojan/pkg-plist << '087da27d3be6e2c394e14c7f3066bbef' Xbin/trojan X%%ETCDIR%%/config.json Xman/man1/trojan.1.gz X%%DOCS%%%%DOCSDIR%%/README.md X%%DOCS%%%%DOCSDIR%%/authenticator.md X%%DOCS%%%%DOCSDIR%%/build.md X%%DOCS%%%%DOCSDIR%%/config.md X%%DOCS%%%%DOCSDIR%%/examples/client.json-example X%%DOCS%%%%DOCSDIR%%/examples/forward.json-example X%%DOCS%%%%DOCSDIR%%/examples/nat.json-example X%%DOCS%%%%DOCSDIR%%/examples/server.json-example X%%DOCS%%%%DOCSDIR%%/overview.md X%%DOCS%%%%DOCSDIR%%/protocol.md X%%DOCS%%%%DOCSDIR%%/usage.md 087da27d3be6e2c394e14c7f3066bbef echo x - trojan/trojan.shar sed 's/^X//' >trojan/trojan.shar << '05b59349e346c00464b397adf91ebe43' 05b59349e346c00464b397adf91ebe43 echo c - trojan/files mkdir -p trojan/files > /dev/null 2>&1 echo x - trojan/files/trojan.in sed 's/^X//' >trojan/files/trojan.in << '3ddc0f7c4cf15b995ebcfac4f1cdceb7' X#!/bin/sh X# $FreeBSD: head/net/trojan/files/trojan.in X X# PROVIDE: trojan X# REQUIRE: LOGIN cleanvar X# KEYWORD: shutdown X X# Add the following lines to /etc/rc.conf to enable trojan: X# trojan_enable (bool): Set to "NO" by default. X# Set to "YES" to enable trojan. X# trojan (path): Trojan config file. X# Defaults to "%%PREFIX%%/etc/trojan/config.json" X X X. /etc/rc.subr X Xname="trojan" Xrcvar=trojan_enable X X Xload_rc_config $name X X: ${trojan_enable:="NO"} X: ${trojan_config="%%PREFIX%%/etc/trojan/config.json"} X Xcommand="%%PREFIX%%/bin/trojan" Xrequired_files="${trojan_config}" X Xcommand_args="-c $trojan_config" X Xrun_rc_command "$1" 3ddc0f7c4cf15b995ebcfac4f1cdceb7 exit