Some checks failed
Build three ZaStoGram APKs / build (arm64-v8a, ZaStoGram-standalone-arm64-v8a, Arm64, arm64) (push) Failing after 41s
Build three ZaStoGram APKs / build (armeabi-v7a, ZaStoGram-standalone-armeabi-v7a, Armv7, armv7) (push) Failing after 41s
ZaStoGram source guards / guards (push) Failing after 16s
Build three ZaStoGram APKs / build (x86, ZaStoGram-standalone-x86, X86, x86) (push) Failing after 36s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
855 B
C++
22 lines
855 B
C++
/* Cloudflare WARP as an optional ENTRY hop (jni/zsg_naive/WarpEntry.cpp). With the setting on, the TCP connections of
|
|
* tgnet (direct, MTProxy, WSS, Naive) go to a loopback port of the zsgnaive library instead of the real address; the
|
|
* library carries the bytes through a WireGuard tunnel to WARP. A tunnel that is not up leaves every connection direct. */
|
|
#ifndef ZSG_NAIVE_WARP_ENTRY_H
|
|
#define ZSG_NAIVE_WARP_ENTRY_H
|
|
|
|
#include <jni.h>
|
|
#include <netinet/in.h>
|
|
|
|
namespace tgnet {
|
|
namespace naive {
|
|
|
|
/* If the tunnel is up and |address| is a public IPv4 address, fills |redirected| with 127.0.0.1:<forward port> and
|
|
* returns true; the caller connects to |redirected| instead. Any thread. */
|
|
bool WarpRedirect(const sockaddr_in &address, sockaddr_in *redirected);
|
|
|
|
bool RegisterWarpJni(JNIEnv *env);
|
|
|
|
} // namespace naive
|
|
} // namespace tgnet
|
|
|
|
#endif
|