Initial MeshPort SDK and cross-platform client
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include "meshport.h"
|
||||
int main(void) {
|
||||
uint64_t context = meshport_context_new();
|
||||
if (!context) return 1;
|
||||
char *result = meshport_call(context, "{\"op\":\"status\"}");
|
||||
if (result) { puts(result); meshport_string_free(result); }
|
||||
meshport_context_free(context);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Replace with the same network identity used on the game server.
|
||||
hostname = "MeshPort-Lab"
|
||||
ipv4 = "10.77.0.11"
|
||||
listeners = []
|
||||
|
||||
[[peer]]
|
||||
uri = "udp://relay.example.com:11010"
|
||||
|
||||
[network_identity]
|
||||
network_name = "game-net"
|
||||
network_secret = "replace-me"
|
||||
|
||||
[flags]
|
||||
no_tun = true
|
||||
use_smoltcp = true
|
||||
enable_encryption = true
|
||||
default_protocol = "udp"
|
||||
latency_first = true
|
||||
@@ -0,0 +1,13 @@
|
||||
# macOS development helper; choose an unused private subnet and unique address.
|
||||
ipv4 = "192.168.20.5/24"
|
||||
listeners = []
|
||||
[[peer]]
|
||||
uri = "tcp://your-server:52015"
|
||||
[network_identity]
|
||||
network_name = "your-network"
|
||||
network_secret = "replace-me"
|
||||
[runtime]
|
||||
mode = "system_vpn"
|
||||
|
||||
# Optional: a remote peer must advertise this private LAN.
|
||||
# subnet_routes = ["192.168.21.0/24"]
|
||||
Reference in New Issue
Block a user