-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from zpc0/vncrepeater
vncrepeater: import package
- Loading branch information
Showing
3 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# | ||
# 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:=2 | ||
PKG_MAINTAINER:=Jirka Spicak <[email protected]> | ||
PKG_LICENSE:=GPL-2.0 | ||
|
||
|
||
PKG_SOURCE:=repeater014.zip | ||
PKG_SOURCE_URL:=http://jtko.mbnet.fi/uvncrepeater | ||
PKG_HASH:=79178e9baa9cac05f26e43f742933958707cb5c0632c51a5706b13922f3bb5b0 | ||
|
||
PKG_BUILD_PARALLEL:=1 | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/vncrepeater | ||
SECTION:=net | ||
CATEGORY:=Network | ||
DEPENDS:=+libstdcpp | ||
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -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 | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- a/repeater.cpp | ||
+++ b/repeater.cpp | ||
@@ -593,7 +593,9 @@ static bool checkIdCode(char *IdCode) | ||
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 @@ static bool isServerAddressAllowed(char | ||
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 @@ int main(int argc, char **argv) | ||
struct sigaction saInt; | ||
|
||
//ini file default | ||
- char defaultIniFilePathAndName[] = "/etc/uvncrepeater.ini"; | ||
+ char defaultIniFilePathAndName[] = "/etc/vncrepeater.conf"; | ||
char tmpBuf[MAX_PATH]; | ||
bool memoryOk; | ||
|