Commit Graph

1189 Commits

Author SHA1 Message Date
Joseph Henry
fa34fb62e6 Minor Windows build fixes 2021-05-05 19:55:47 -07:00
Joseph Henry
5a668ceeba Move some out-dated examples to attic, update README.md 2021-05-05 16:43:33 -07:00
Joseph Henry
90c4744a3b Update C API selftest 2021-05-05 16:27:53 -07:00
Joseph Henry
9151f4471c Slight re-org of C API naming convention 2021-05-05 16:19:27 -07:00
Joseph Henry
85b861da2f Minor adjustment to build script 2021-05-05 15:52:23 -07:00
Joseph Henry
47b1facdd4 Fix misc build issues 2021-05-05 13:58:16 -07:00
Joseph Henry
3093a643d9 Add submodule check to build script 2021-05-05 13:53:58 -07:00
github-actions
2d2afce4f7 Code style fixes 2021-05-03 04:30:55 +00:00
Joseph Henry
6a77f0092f Update Python bindings to 1.4.0 API (WIP) 2021-05-02 21:30:21 -07:00
Joseph Henry
6f42338f6e Update C# bindings to 1.4.0 API 2021-04-30 21:54:34 -07:00
Joseph Henry
3e304cb25a Reduce number of compile-time warnings (continued) 2021-04-30 16:38:21 -07:00
Joseph Henry
6763ced6f5 Reduce number of compile-time warnings 2021-04-30 15:36:46 -07:00
Joseph Henry
c6a51d3188 Update C API selftest 2021-04-29 20:27:08 -07:00
Joseph Henry
782d221eb9 Add WIP Java language bindings 2021-04-29 19:51:07 -07:00
Joseph Henry
904e50e8e9 Fix bug in network transport readiness check function 2021-04-29 19:41:13 -07:00
Joseph Henry
016b0ffc0e Adjust nomenclature. Add more C API extension functions 2021-04-29 14:03:15 -07:00
Joseph Henry
9ed0ee68ab Improve build parallelism in build.sh 2021-04-26 22:12:29 -07:00
Joseph Henry
a247552df1 Format according to new ZeroTier standard 2021-04-26 22:07:55 -07:00
Joseph Henry
07b2a33447 Update .clang-format to reflect new ZeroTier standard 2021-04-26 21:56:33 -07:00
Joseph Henry
c456a87f97 Add zts_core_query_ and world sub-APIs. Adjust event subsystem 2021-04-26 21:55:01 -07:00
github-actions
ac7e01f328 Code style fixes 2021-04-22 18:20:43 +00:00
Joseph Henry
43350691b5 Expand C API and simplify NodeService 2021-04-22 11:20:04 -07:00
Joseph Henry
565b56d290 Adjust test targets and code style enforcement in build script 2021-04-22 11:17:58 -07:00
Joseph Henry
4f3120ad5b Update workflows 2021-04-22 10:36:31 -07:00
Joseph Henry
6eaa03c04b Update .clang-format code style 2021-04-20 13:47:37 -07:00
Joseph Henry
90f9e7c72a Update .clang-format code style 2021-04-19 09:55:14 -07:00
Joseph Henry
7e05f13295 Remove C++ examples (To be replaced with C examples) 2021-04-18 00:06:54 -07:00
Joseph Henry
00880628fd Add code style enforcement to github workflow 2021-04-18 00:04:33 -07:00
Joseph Henry
a5121b1e3c Applied styling rules from .clang-format 2021-04-17 23:46:21 -07:00
Joseph Henry
8e7bcdb16a Add .clang-format file 2021-04-17 23:36:17 -07:00
Joseph Henry
944796a083 Merge branch 'GermanAizek-master' 2021-03-27 10:06:15 -07:00
Joseph Henry
94053522cf Merge branch 'master' of https://github.com/GermanAizek/libzt into GermanAizek-master 2021-03-27 10:05:59 -07:00
Joseph Henry
e288787f74 Merge branch 'linsomniac-py_send_binary3' 2021-03-26 20:10:32 -07:00
Joseph Henry
46eb8be174 Merge branch 'py_send_binary3' of https://github.com/linsomniac/libzt into linsomniac-py_send_binary3 2021-03-26 20:08:13 -07:00
Joseph Henry
e69956a230 Merge branch 'linsomniac-linsomniac_review' 2021-03-26 20:02:31 -07:00
Joseph Henry
66d791f920 Merge branch 'linsomniac_review' of https://github.com/linsomniac/libzt into linsomniac-linsomniac_review 2021-03-26 19:57:09 -07:00
Joseph Henry
6638f20003 Add IPv6 to C# ZeroTier.Sockets, Add C# selftest, Misc C API improvements 2021-03-26 16:33:22 -07:00
GermanAizek
ac1a1b1d2b Fixed memleak, optimize and refactor code 2021-03-26 01:15:52 +03:00
Joseph Henry
9cd5fdee7b Update C API: Add functions that simplify wrapper generation 2021-03-24 12:20:39 -07:00
Sean Reifschneider
5f6faaa5e8 Python send() with binary data
zts_py_send() was using strlen() to determine the length of the
send(). This works fine with strings, but fails with binary
data.

To fix this, I have removed the string encoding code, and
converted to using the Buffer protocol as is done in the
Python socketmodule send() implementation. This does mean
that this send() implementation only takes byte-like objects.

The workaround for this could be at the python level rather
than the C++ level.

NOTE: This implementation has a bug in the exception handling
if a non-bytes-like object is passed. You get an exception,
but the exception is not accurate, it reports the TypeError,
but the actual raised exception is due to there being a return
value when the error indicator is set. I spent a few hours
trying to fix this but was unable to. I'm afraid I just couldn't
figure it out.

My SSH proxy was misbehaving because the second block
of data going from the client to the server had a NUL byte as
the first byte to send, so the send was returning 0 bytes
sent, but that was due to send() being told to send 0 bytes.

With this, my SSH proxy is now working, including able to run
an rsync of my boot initrd over SSH over ZeroTier entirely in
userspace.
2021-03-20 13:01:50 -06:00
Joseph Henry
4b190ee384 Replace manual csc.exe invokation with dotnet project (for NuGet build) 2021-03-20 03:06:24 -07:00
Joseph Henry
42f188cdd6 Add NuGet package workflow 2021-03-19 23:11:45 -07:00
Joseph Henry
ea71b85627 Minor Windows build fixes 2021-03-19 22:57:21 -07:00
Joseph Henry
3aa402582f Remove out-of-place includes for signal handler functions 2021-03-19 22:33:15 -07:00
Sean Reifschneider
2ca8e01864 Fixing some bugs in socket blocking.
There were some bugs in my blocking code that are fixed in this.
I had the setblocking() flag reversed, and wasn't passing the
flag along to the underlying code properly.
2021-03-19 10:44:29 -06:00
Sean Reifschneider
14e70ec876 Assorted Python changes based on a code review.
Many changes were based on conventions in the Python socketmodule.

Changed many of the docstrings to match the Python socket library
conventions and enhancing them.  I can either remove the prototype
part or add it to other docstrings in the library, depending on
feedback I get.

Changed setblocking to use the flag argument instead of always
just setting NONBLOCK.

Added enable/disable threading around more lwip calls.

Implementing optional backlog on listen().

Removing a few seemingly unneeded Py_INCREF(Py_None) calls.

Moved getblocking function based on alpha sorting of names.
2021-03-18 22:55:37 -06:00
Joseph Henry
36256ea1b2 Update PyPI package build workflow to build Swig wrapper automatically 2021-03-17 18:50:45 -07:00
Joseph Henry
6d0b46a5c3 Update PyPI package version to 1.3.4b1 2021-03-17 14:57:06 -07:00
Joseph Henry
2e2a66c9f7 Move Python license into ext/THIRDPARTY.txt 2021-03-17 14:34:51 -07:00
Joseph Henry
73e26c1a79 Bugfix: Check argument types and encodings in zts_py_send() 2021-03-16 23:30:14 -07:00