release: 1.4.4 — channel «Облако» (WebSocket via KeenDNS cloud to own Keenetic): wsgw gateway, Android 1.4.4, iOS, docs/cloud.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,4 +35,7 @@ let obf = p.obfuscatorConfig(listen: 13255, target: "127.0.0.1:13258")
|
||||
precondition(obf.contains("target = 127.0.0.1:13258") && obf.contains("key = testkey") && !obf.contains("203.0.113.10"))
|
||||
let wg = p.wireGuardConfig(endpoint: "127.0.0.1:13255", allowedIPs: "1.0.0.0/8")
|
||||
precondition(wg.contains("Endpoint = 127.0.0.1:13255") && wg.contains("AllowedIPs = 1.0.0.0/8") && !wg.contains("= none"))
|
||||
precondition(wg.contains("MTU = 1280") && !wg.contains("1420")) // panel default -> 1280
|
||||
let custom = PhobosProfile.fromLink("phobos://" + Data(conf.replacingOccurrences(of: "MTU = 1420", with: "MTU = 1300").utf8).base64EncodedString())!.0
|
||||
precondition(custom.wireGuardConfig(endpoint: "e", allowedIPs: nil).contains("MTU = 1300")) // link MTU wins
|
||||
print("profile_check ok")
|
||||
|
||||
22
ios/Tests/RelayCheck/main.c
Normal file
22
ios/Tests/RelayCheck/main.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Mode «Облако» of pcarelay without a phone: cc -I Tunnel -o /tmp/rc Tests/RelayCheck/main.c Tunnel/pcarelay.c && /tmp/rc */
|
||||
#include "pcarelay.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
int wgobf_main(int c, char **v) { return 0; }
|
||||
static void out(const unsigned char *p, int n) { unsigned char r[64]; memcpy(r, p, n); r[0] = 'R'; pcarelay_ws_in(r, n); }
|
||||
int main(void) {
|
||||
pcarelay_start(13299, "127.0.0.1", 9, 0);
|
||||
pcarelay_use_ws(out);
|
||||
usleep(200000);
|
||||
assert(pcarelay_is_ws() && !pcarelay_is_tcp());
|
||||
int s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
struct sockaddr_in a = {.sin_family = AF_INET, .sin_port = htons(13299), .sin_addr.s_addr = htonl(INADDR_LOOPBACK)};
|
||||
struct timeval tv = {2, 0}; setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
|
||||
sendto(s, "ping", 4, 0, (struct sockaddr *)&a, sizeof a);
|
||||
char b[16] = {0}; int n = recv(s, b, sizeof b, 0);
|
||||
assert(n == 4 && !memcmp(b, "Ring", 4) && pcarelay_rx_bytes() == 4);
|
||||
puts("pcarelay ws: ok");
|
||||
}
|
||||
Reference in New Issue
Block a user