Added UltraVNC Repeater

Signed-off-by: Jirka Spicak <robutek@gmail.com>
This commit is contained in:
JimmyS83 2016-11-17 09:44:20 +01:00 committed by JimmyS83
parent 583af8565e
commit 7c305d4cf8
3 changed files with 147 additions and 0 deletions

70
net/vncrepeater/Makefile Normal file
View File

@ -0,0 +1,70 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=vncrepeater
PKG_VERSION:=0.14
PKG_RELEASE:=1
PKG_MAINTAINER:=Jirka Spicak <robutek@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=repeater014.zip
PKG_SOURCE_URL:=http://jtko.mbnet.fi/uvncrepeater
PKG_MD5SUM:=3005ebbb2f9442cbea4cbcaa71925dbf
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/vncrepeater
SECTION:=net
CATEGORY:=Network
DEPENDS:=$(CXX_DEPENDS)
TITLE:=UltraVNC repeater for Linux
URL:=http://www.uvnc.com/addons/repeater.html
endef
define Package/vncrepeater/conffiles
/etc/vncrepeater.conf
endef
define Package/vncrepeater/description
Viewer can be behind Nat router or directly connected to the internet
instead of forwarding serveral ports, you only need to forward 1 port.
If the PC that runs the Repeater has access to the local DNS server,
you can use your local DNS names instead of 10.10.10.12.
This could be handy when you have a dynamic DHCP server allocating
ip adresses for your PC.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(PKG_UNPACK)
$(CP) $(PKG_BUILD_DIR)/../Ver014/* $(PKG_BUILD_DIR)/
rm -rf $(PKG_BUILD_DIR)/../Ver014/
$(Build/Patch)
endef
define Build/Compile
$(call Build/Compile/Default, \
CC="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -fno-rtti" \
repeater \
)
endef
define Package/vncrepeater/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/repeater $(1)/usr/sbin/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_BUILD_DIR)/uvncrepeater.ini $(1)/etc/vncrepeater.conf
endef
$(eval $(call BuildPackage,vncrepeater))

View File

@ -0,0 +1,39 @@
--- vncrepeater-0.14/Makefile 2006-04-09 23:37:10.000000000 +0200
+++ vncrepeater-0.14.new/Makefile 2016-11-09 19:59:13.000000000 +0100
@@ -1,27 +1,28 @@
CFLAGS=-Wall
repeater: repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o
- g++ $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o
+ $(CC) $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o $(LDFLAGS)
repeater.o: repeater.cpp
- g++ $(CFLAGS) -c repeater.cpp
+ $(CC) $(CFLAGS) -c repeater.cpp
repeaterproc.o: repeaterproc.cpp
- g++ $(CFLAGS) -c repeaterproc.cpp
+ $(CC) $(CFLAGS) -c repeaterproc.cpp
openbsd_stringfuncs.o: openbsd_stringfuncs.cpp
- g++ $(CFLAGS) -c openbsd_stringfuncs.cpp
+ $(CC) $(CFLAGS) -c openbsd_stringfuncs.cpp
iniparser.o: iniparser.cpp
- g++ $(CFLAGS) -c iniparser.cpp
+ $(CC) $(CFLAGS) -c iniparser.cpp
readini.o: readini.cpp
- g++ $(CFLAGS) -c readini.cpp
+ $(CC) $(CFLAGS) -c readini.cpp
repeaterutil.o: repeaterutil.cpp
- g++ $(CFLAGS) -c repeaterutil.cpp
+ $(CC) $(CFLAGS) -c repeaterutil.cpp
repeaterevents.o: repeaterevents.cpp
- g++ $(CFLAGS) -c repeaterevents.cpp
+ $(CC) $(CFLAGS) -c repeaterevents.cpp
clean:
rm -f *.o repeater
+

View File

@ -0,0 +1,38 @@
--- vncrepeater-0.14/repeater.cpp 2006-10-20 17:07:50.000000000 +0200
+++ vncrepeater-0.14.new/repeater.cpp 2016-11-19 17:04:59.907871000 +0100
@@ -593,7 +593,9 @@
static long parseId(char *IdCode)
{
unsigned int ii;
- int retVal;
+ //PFaf 20101122: Minor correction due to compiler warning
+ //int retVal;
+ long retVal;
debug(LEVEL_3, "parseId(): IdCode = %s\n", IdCode);
@@ -998,9 +1000,13 @@
allow = false;
//server 0 == denied
- if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0))
+ //Fix by PFaf - 20101122
+ //Server address can be X.0.0.Y i.e. 10.0.0.1
+ //since these are valid addresses, so we should not exclude them.
+ //Only exclude addresses that start or end with zeros (0).
+ //if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0))
+ if ((srvAddr.a == 0) || (srvAddr.d == 0))
allow = false;
-
//allowed so far ?
if (allow)
@@ -1983,7 +1989,7 @@
struct sigaction saInt;
//ini file default
- char defaultIniFilePathAndName[] = "/etc/uvncrepeater.ini";
+ char defaultIniFilePathAndName[] = "/etc/vncrepeater.conf";
char tmpBuf[MAX_PATH];
bool memoryOk;