From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 23 21:05:50 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BC37348 for ; Sun, 23 Nov 2014 21:05:50 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82A9B791 for ; Sun, 23 Nov 2014 21:05:50 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sANL5obP091127 for ; Sun, 23 Nov 2014 21:05:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 195313] New: [Update] net/hanstunnel Date: Sun, 23 Nov 2014 21:05:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: vsityz@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 21:05:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195313 Bug ID: 195313 Summary: [Update] net/hanstunnel Product: Ports Tree Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: vsityz@gmail.com # 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: # # hanstunnel # hanstunnel/distinfo # hanstunnel/Makefile # hanstunnel/files # hanstunnel/files/patch-Makefile # hanstunnel/files/patch-tun.cpp # hanstunnel/files/patch-echo.cpp # hanstunnel/pkg-message # hanstunnel/pkg-descr # echo c - hanstunnel mkdir -p hanstunnel > /dev/null 2>&1 echo x - hanstunnel/distinfo sed 's/^X//' >hanstunnel/distinfo << '65400445990c1970b9f5ad17ab147fd4' XSHA256 (hans-0.4.4.tar.gz) = 81378258b8c9510ac01ad4d69f191e2927b9304daae033ee097f6ba4d39f6bb3 XSIZE (hans-0.4.4.tar.gz) = 33992 65400445990c1970b9f5ad17ab147fd4 echo x - hanstunnel/Makefile sed 's/^X//' >hanstunnel/Makefile << '87523a3042cf8f2ebc7a9370982f09ef' X# Created by: Alexander Panyushkin X# $FreeBSD$ X XPORTNAME= hans XPORTVERSION= 0.4.4 XCATEGORIES= net security XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= /hanstunnel/source/ X XMAINTAINER= vsityz@gmail.com XCOMMENT= Hans makes it possible to tunnel IPv4 through ICMP X XLICENSE= GPLv3 X XOPTIONS_DEFINE= CLANG XCLANG_DESC= Build with Clang instead of GCC XOPTIONS_DEFAULT= CLANG XPLIST_FILES= ${LOCALBASE}/bin/hans X X.include X X.if ${PORT_OPTIONS:MCLANG} X.if ${OSVERSION} >= 900033 && exists(/usr/bin/clang) XCC= clang XCXX= clang++ X.else XBUILD_DEPENDS+= clang33:${PORTSDIR}/lang/clang33 XCC= clang33 XCXX= clang++33 X.endif X.else XUSE_GCC?= yes X.endif X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${PREFIX}/bin/hans X Xpost-install: .SILENT X ${ECHO_MSG} X ${CAT} ${PKGMESSAGE} X ${ECHO_MSG} X X.include 87523a3042cf8f2ebc7a9370982f09ef echo c - hanstunnel/files mkdir -p hanstunnel/files > /dev/null 2>&1 echo x - hanstunnel/files/patch-Makefile sed 's/^X//' >hanstunnel/files/patch-Makefile << '00f1877f7d4533cd6adc2ee1c8be24c9' X--- Makefile.orig 2014-11-22 17:46:35.000000000 +0200 X+++ Makefile 2014-11-22 17:49:13.000000000 +0200 X@@ -1,8 +1,6 @@ X-LDFLAGS = `sh osflags ld $(MODE)` X-CFLAGS = -c -g `sh osflags c $(MODE)` X-TUN_DEV_FILE = `sh osflags dev $(MODE)` X-GCC = gcc X-GPP = g++ X+TUN_DEV_FILE = src/tun_dev_freebsd.c X+GCC = ${CC} X+GPP = ${CXX} X X .PHONY: directories X X@@ -16,46 +14,46 @@ X tunemu.o: directories build/tunemu.o X X hans: build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o X- $(GPP) -o hans build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o $(LDFLAGS) X+ ${GPP} -o hans build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o $(LDFLAGS) X X build/utility.o: src/utility.cpp src/utility.h X- $(GPP) -c src/utility.cpp -o $@ -o $@ $(CFLAGS) X+ ${GPP} -c src/utility.cpp -o $@ -o $@ ${CFLAGS} X X build/exception.o: src/exception.cpp src/exception.h X- $(GPP) -c src/exception.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/exception.cpp -o $@ ${CFLAGS} X X build/echo.o: src/echo.cpp src/echo.h src/exception.h X- $(GPP) -c src/echo.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/echo.cpp -o $@ ${CFLAGS} X X build/tun.o: src/tun.cpp src/tun.h src/exception.h src/utility.h src/tun_dev.h X- $(GPP) -c src/tun.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/tun.cpp -o $@ ${CFLAGS} X X build/tun_dev.o: X- $(GCC) -c $(TUN_DEV_FILE) -o build/tun_dev.o -o $@ $(CFLAGS) X+ ${GCC} -c ${TUN_DEV_FILE} -o build/tun_dev.o -o $@ ${CFLAGS} X X build/sha1.o: src/sha1.cpp src/sha1.h X- $(GPP) -c src/sha1.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/sha1.cpp -o $@ ${CFLAGS} X X build/main.o: src/main.cpp src/client.h src/server.h src/exception.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h X- $(GPP) -c src/main.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/main.cpp -o $@ ${CFLAGS} X X build/client.o: src/client.cpp src/client.h src/server.h src/exception.h src/config.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h X- $(GPP) -c src/client.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/client.cpp -o $@ ${CFLAGS} X X build/server.o: src/server.cpp src/server.h src/client.h src/utility.h src/config.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h X- $(GPP) -c src/server.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/server.cpp -o $@ ${CFLAGS} X X build/auth.o: src/auth.cpp src/auth.h src/sha1.h src/utility.h X- $(GPP) -c src/auth.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/auth.cpp -o $@ ${CFLAGS} X X build/worker.o: src/worker.cpp src/worker.h src/tun.h src/exception.h src/time.h src/echo.h src/tun_dev.h src/config.h X- $(GPP) -c src/worker.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/worker.cpp -o $@ ${CFLAGS} X X build/time.o: src/time.cpp src/time.h X- $(GPP) -c src/time.cpp -o $@ $(CFLAGS) X+ ${GPP} -c src/time.cpp -o $@ ${CFLAGS} X X clean: X rm -rf build hans X X build/tunemu.o: src/tunemu.h src/tunemu.c X- $(GCC) -c src/tunemu.c -o build/tunemu.o X+ ${GCC} -c src/tunemu.c -o build/tunemu.o 00f1877f7d4533cd6adc2ee1c8be24c9 echo x - hanstunnel/files/patch-tun.cpp sed 's/^X//' >hanstunnel/files/patch-tun.cpp << '0a4216e67650c84929001f6d046ecbda' X--- src/tun.cpp.orig 2014-02-07 05:36:31.000000000 +0200 X+++ src/tun.cpp 2014-11-22 17:31:16.000000000 +0200 X@@ -20,7 +20,7 @@ X #include "tun.h" X #include "exception.h" X #include "utility.h" X- X+#include X #include X #include X #include X@@ -69,23 +69,17 @@ X string ips = Utility::formatIp(ip); X string destIps = Utility::formatIp(destIp); X X-#ifdef LINUX X- snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s netmask 255.255.255.0", device, ips.c_str()); X-#else X- snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.255", device, ips.c_str(), destIps.c_str()); X-#endif X+ snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.0", device, ips.c_str(), destIps.c_str()); X X if (system(cmdline) != 0) X syslog(LOG_ERR, "could not set tun device ip address"); X X-#ifndef LINUX X if (includeSubnet) X { X snprintf(cmdline, sizeof(cmdline), "/sbin/route add %s/24 %s", destIps.c_str(), destIps.c_str()); X if (system(cmdline) != 0) X syslog(LOG_ERR, "could not add route"); X } X-#endif X } X X void Tun::write(const char *buffer, int length) 0a4216e67650c84929001f6d046ecbda echo x - hanstunnel/files/patch-echo.cpp sed 's/^X//' >hanstunnel/files/patch-echo.cpp << 'c9aaa09cd5c270680d478f955bb4582b' X--- src/echo.cpp.orig 2014-11-22 17:51:42.000000000 +0200 X+++ src/echo.cpp 2014-11-22 17:51:46.000000000 +0200 X@@ -19,7 +19,7 @@ X X #include "echo.h" X #include "exception.h" X- X+#include X #include X #include X #include c9aaa09cd5c270680d478f955bb4582b echo x - hanstunnel/pkg-message sed 's/^X//' >hanstunnel/pkg-message << '35a6976a3b2d8f949619ff80f5876ac6' X------------------------------------------------------------ X XHans runs on Linux as a client and a server. XIt runs on FreeBSD client only. X XNOTE: that Hans can not receive echo requests on BSD systems. XTherefore the server only works on Linux. X X------------------------------------------------------------ X X### Running as a server ### X X% hans -s 10.1.2.0 -r -p password -u nobody X X### Running as a client ### X X% hans -c server_address -p password -u nobody X X### Help ### X X% hans X X------------------------------------------------------------ 35a6976a3b2d8f949619ff80f5876ac6 echo x - hanstunnel/pkg-descr sed 's/^X//' >hanstunnel/pkg-descr << 'b3d8e535b1ab66b72469a8c0f03d82f8' XHans makes it possible to tunnel IPv4 through ICMP echo packets, so you Xcould call it a ping tunnel. This can be useful when you find yourself Xin the situation that your Internet access is firewalled, but pings are Xallowed. X XHans runs on Linux as a client and a server. It runs on Mac OS X, XiPhone/iPod touch, FreeBSD and OpenBSD as a client only. X X XWWW: http://code.gerade.org/hans/ b3d8e535b1ab66b72469a8c0f03d82f8 exit -- You are receiving this mail because: You are the assignee for the bug.