Browse Source
- Fixed init_connections() to allow 0 connections for server-only mode - All instances now require [server] section for bind socket - Added test configs demonstrating server-only and client-with-server patterns - Created run_two_instance_test.sh for manual handshake testingv2_dev
3 changed files with 39 additions and 2 deletions
@ -0,0 +1,25 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Test script for ETCP connection establishment with real instances |
||||||
|
|
||||||
|
DIR=$(cd "$(dirname "$0")" && pwd) |
||||||
|
|
||||||
|
echo "=== ETCP Two-Instance Test ===" |
||||||
|
echo |
||||||
|
|
||||||
|
# Start server instance in background |
||||||
|
echo "Starting server instance..." |
||||||
|
$DIR/test_server_only & |
||||||
|
SERVER_PID=$! |
||||||
|
sleep 1 |
||||||
|
|
||||||
|
# Start client instance |
||||||
|
echo "Starting client instance..." |
||||||
|
timeout 10 $DIR/test_server_only 2>&1 |
||||||
|
|
||||||
|
# Cleanup |
||||||
|
kill $SERVER_PID 2>/dev/null |
||||||
|
wait $SERVER_PID 2>/dev/null |
||||||
|
|
||||||
|
echo |
||||||
|
echo "=== Test completed ===" |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
[global] |
||||||
|
my_node_id=0x1111111111111111 |
||||||
|
my_private_key=1313912e5d34768983b0e06530a48c77816d228a5b5605e1ab3dc443d107a3dc |
||||||
|
my_public_key=dde6cec8a9023339a758f60883ef41534d24a1ffdc09bbb787a5c24ddfd891e3092461835a97d37944c681fc6b2c1f5acde8ad192f7d2cdc9920aa0d3ff78e99 |
||||||
|
tun_ip=10.99.0.1/24 |
||||||
|
tun_ifname=tun99 |
||||||
|
|
||||||
|
[server: test] |
||||||
|
addr=127.0.0.1:9001 |
||||||
|
type=public |
||||||
Loading…
Reference in new issue