Commit Graph

30 Commits

Author SHA1 Message Date
Logan oos Even
99b6b6b66d
added n2n-route tool (#982)
* moved dev to version 3.1.1

* laid ground for n2n-route tool

* adapted code style

* overhauled n2n-route's tool program logic and removed route code from edge

* added missing initialization of federation's purgeable field

* lifted un/purgeable confusion

* added warning about removed -n cli option

* realized that Windows does not offer inet_aton()

* removed -n option documentation from edge's man page

* slightly simplified n2n-route program logic

* applied more logic changes to n2n-route tool

* added 'info' read command to edge's management port

* corrected indention

* added Linux route control to n2n-route tool

* temporarily restricted n2n-route tool to Linux only

* We must be over the routing!

* pulled default gateway change detection into main loop to cover mobile use, and added devstr_t type

* corrected use of new UNPURGEABLE - so far gone unnoticed

* addresses possiible address issue

* i broke it

* reverted bad ideas

* added command line options, help text, and prevented vpn gateway being used for supernode/peer traffic routes

* added option to manually provide default gateway, also verbosity options

* getting there

* added option to limit networks to be routed (-n), adapted documentation

* fine-tuned minor things
2022-05-24 20:38:51 +02:00
Logan oos Even
e686b9592c
(C) update (#965) 2022-03-12 10:22:42 +01:00
Hamish Coleman
109b6e2fa5 Remove one remaining use of N2N_OSNAME and cleanup 2021-11-02 09:35:03 +00:00
Hamish Coleman
a9216f1097 Remove GIT_RELEASE variable and use the semantically identical N2N_VERSION instead 2021-11-01 19:15:23 +00:00
Hamish Coleman
4438f1aa2a
added mingw test platform (#829)
* Provide a minimal reimplementation of our autoconf, to try windows builds

* Try building with windows

* Fix thinko in spelling

* Ensure shell script runs inside a shell

* Add a hack to aid include discovery

* Just keep adding tech debt...

* Assume that we will have slashes in some of the replacement strings and avoid that char with sed

* Restore one slash

* Hack around the tools makefile interdependancy bug

* A correct cflags include hack for each compile dir

* Ensure we link against winsock (note, even though this says 32bit, it should link the 64bit library ... I think)

* Bad link ordering if we dont use LDLIBS

* Remove unused make variable

* Remove makefile duplication using inheritance (this does mean you can no longer cd tools; make, but must do make tools)

* Add missing library for win32

* Show OS variable

* Make hack autoconf more robust for tests on non gitlab runners

* Remove no longer used substitutions from hack autoconf

* Add missing include path to tools under win32

* Build the win32 subdir when the compiler is Msys

* The different subdirs have different dependancies

* Ensure we can find the include files

* Fix library link ordering

* Ensure the tools dir can find the special win32 lib

* Deal with the differing basic type sizes on both linux/64bit and windows/64bit

* Document the steps to mimic the github windows/mingw build locally - to allow for simpler debugging

* Ensure branch name in instructions matches my test branch name

* Clarify the shell needed to build with mingw

* Since the makefile depends on knowing the OS, raise a fatal error if we cannot determine this

* Handling different compile environments is hard.

- Linux: sane and reasonable results for both uname -s (=Linux) and
  uname -o (=GNU/Linux)
- Windows/Mingw: insane results for uname -s
  (=MSYS_NT-$MAJOR.$MINOR-$BUILDNR) but sane results for uname -o (Msys)
- Macos: sane results for uname -s (=Darwin) but does not support
  uname -o at all

* Revamp the way that Mingw is detected

* Avoid attempting to generate gcovr report when running under windows

* Whoops, isolate the right step

* Fix spelling mistake

* win32/Makefile: Remove unused setting and add comment

* ensure that all win32 includes use the same expected path

* Allow simpler cross compilation by letting configure pass the CC and AR environment through

* Avoid multiple '_CRT_SECURE_NO_WARNINGS redefined' warnings

* Convert to a consolidated CONFIG_TARGET variable to select any different compile options

* Use the more generic printf defines to avoid warnings on mingw

* Update mingw build docs

* English better for reader happy make

* Address a number of mingw compiler warnings

* Fix Visual C compile

* Be sure to document some of the hacky nature of the mingw build
2021-10-06 00:52:15 +05:45
Logan oos Even
6a831879d3
make edge restore original metric value (-x) at program's end (#742) 2021-08-01 13:25:12 +05:45
skyformat99
fe4dfc5a7a
updated for compilation with VS2015 2021-07-23 14:49:32 +05:45
Logan oos Even
b648872c1f
modified route setup (#717) 2021-07-11 00:22:58 +05:45
Logan oos Even
c55e3e3246
multithreaded supernode name resolution (#645) 2021-06-04 03:52:12 +05:45
Logan oos Even
c5a0d186b0
handled metric default 2021-02-01 19:28:40 +05:45
Logan oos Even
916c423ffe
fixed metric parameter passing to wintap.c (#618)
* fixed metric parameter passing to wintap.c

* fixed metric sub/interface command to set metric
2021-02-01 16:19:19 +05:45
anzz1
9cac336488
added network interface metric option for windows (#606) 2021-01-30 18:00:01 +05:45
Logan oos Even
f352c99255
reworked edge help text (#604) 2021-01-28 00:07:28 +05:45
fengdaolong
d7654397a8
Fix the problem of running edge, IP or domain name resolution failure under Windows system. (#527) 2020-12-08 15:46:40 +01:00
joshuafc
b3f564e58c
Traffic Restrictions, Pass Build on CircleCI and local Windows 10 VS2019 (#499)
* Add new file 'network_traffic_filter.c/.h"

* Add feature to drop or accept specific packet transmit over edge network interface by rules.

* fix CMakeLists.txt typo

* Update Rule String Format

* replace -F (filter) with -R (rule) for traffic restrictions.

* Update edge help (-h)  message. Update documents.

* Pass Build on CircleCI and local Windows 10 VS2019

* Fix cmake build failed because of sn_selection

* fix operate void* cause vs2016 build failed

* Fix typo to pass build on windows.

* add inttypes.h for n2n_typedefs.h to pass windows build

* modify headers to pass build on windows.
2020-11-16 21:27:42 +01:00
fengdaolong
92dfa67e22 Added DHCP function embedded in sn.
1. Automatically assign IP addresses to the edge through the DHCP function that comes with sn, the default IP address pool is 172.17.12.0/24.
2. The -d parameter is added to sn, and the IP address pool of the embedded DHCP can be customized.
3. Now edge does not need to add -a and -s parameters to automatically obtain the IP address.
4. The IP automatically obtained by the cross-community edge can be the same, because the communities are isolated from each other and do not interfere with each other.
5. On the management side of sn (127.0.0.1:5645), you can now view the IP address of the tutap adapter of each edge.
6. Fix many bugs that have a certain chance of causing memory leaks.
7. Note: This version is not fully compatible with the previous version.
2020-08-08 22:40:45 +08:00
ygg
e0b48f133d On Windows, the Edge node exits when the network card is disabled and opened again 2020-08-04 13:37:01 +08:00
ygg
e6c851d276 add sleep() for fix compile error on windows 2020-07-17 14:21:27 +08:00
fengdaolong
f5accc8221 Fix cmake compilation errors.
1. CMakeLists.txt added to automatically obtain the revised version number from the git repository.
2. Adjusted some header files to fix Windows platform compilation errors.
3. Eliminate some compilation warnings.
2020-07-01 18:35:22 +08:00
emanuele-f
1b1900358b Windows compilation fixes 2019-07-08 12:06:28 +02:00
emanuele-f
cb43d0cf64 Unify n2n version 2019-07-06 13:52:17 +02:00
emanuele-f
53d27bebf5 Implement MAC address change in Windows
Fixes #43
2019-06-30 22:31:31 +02:00
emanuele-f
e1b2ab3eca Set MTU on Windows
Fixes #153
2019-06-30 20:26:35 +02:00
emanuele-f
09707660a1 Print available Windows TAP devices after help 2019-06-30 20:06:07 +02:00
emanuele-f
6d38d4bfb4 Fix adapter name length in windows 2019-06-30 19:10:51 +02:00
emanuele-f
69e1d50ca3 Implement selectable tap adapter in Windows 2019-06-30 18:37:48 +02:00
fengdaolong
69e3b49bec eliminate compilation warnings 2019-06-04 00:09:15 +08:00
Chris Sheely
ba0ecabbf6 Submit minor changes to enable Windows CMake builds w/o further mods. 2019-02-11 16:49:37 -05:00
Luca Deri
1888a0c55a Merge of https://github.com/ntop/n2n/pull/26 2018-08-17 14:27:11 +02:00
Luca Deri
b1e9ce6d2a Initial SVN import of n2n v2 2016-10-23 10:46:15 +02:00