- mosh(blinksh/ios C++)+protobuf-lite 交叉编译为 MoshCore.xcframework (CommonCrypto 后端、含 arm64 模拟器 slice;绕 autotools 用 CMake 直编 + 手写 config.h) - tsnet 桥新增 UDP relay(StartMoshRelay:loopback↔tsnet.Dial 逐包搬运) - MoshSession(pipe↔FILE*/pthread/SIGWINCH)+ MoshConnectScanner(TXCore,+4 单测=39) - SSHTerminalModel 编排:SSH 引导 mosh-server→解析 MOSH CONNECT→relay→mosh 接管 - LAN 直连 + mosh-over-tsnet 均端到端验证通过,R1(tsnet UDP 数据报语义) 证伪 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
2.1 KiB
C
57 lines
2.1 KiB
C
/* config.h — 手写替代 mosh autotools 的 configure 产物(iOS/macOS/Apple Silicon)。
|
||
* 本环境缺 autoconf/automake,故不跑 ./autogen.sh;改由 CMake 直接编 src/*.cc,
|
||
* 用本文件提供全部特性宏。仅面向 Darwin(iOS device/simulator, macOS arm64)。
|
||
* 依据:configure.ac 的 AC_CHECK 系列 + 各 .cc 里实际引用的 HAVE / USE 宏收敛而来。 */
|
||
#ifndef MOSH_TX_CONFIG_H
|
||
#define MOSH_TX_CONFIG_H
|
||
|
||
/* --- 包标识(仅用于版本串打印) --- */
|
||
#define PACKAGE_NAME "mosh"
|
||
#define PACKAGE_STRING "mosh 1.3.2"
|
||
#define PACKAGE_VERSION "1.3.2"
|
||
#define VERSION "1.3.2"
|
||
|
||
/* --- iOS controller 模式:只编 client 库(对应 --enable-ios-controller) --- */
|
||
#define IOS_CONTROLLER 1
|
||
|
||
/* --- crypto 后端:Apple CommonCrypto(iOS/macOS 系统内建,无需 OpenSSL/mbedTLS) ---
|
||
* ocb.cc 用 `#elif USE_APPLE_COMMON_CRYPTO_AES` 选择 <CommonCrypto/CommonCryptor.h>。 */
|
||
#define USE_APPLE_COMMON_CRYPTO_AES 1
|
||
#define USE_OPENSSL_AES 0
|
||
#define USE_NETTLE_AES 0
|
||
#define USE_REFERENCE_AES 0
|
||
#define USE_AES_NI 0
|
||
|
||
/* --- 时间源:iOS/macOS 均有 clock_gettime(CLOCK_MONOTONIC) --- */
|
||
#define HAVE_CLOCK_GETTIME 1
|
||
#define HAVE_GETTIMEOFDAY 1
|
||
#define HAVE_MACH_ABSOLUTE_TIME 1
|
||
|
||
/* --- 字节序:Darwin 用 <libkern/OSByteOrder.h>(byteorder.h 的 HAVE_OSX_SWAP 分支) --- */
|
||
#define HAVE_OSX_SWAP 1
|
||
#define HAVE_DECL_BE64TOH 0
|
||
#define HAVE_DECL_BETOH64 0
|
||
|
||
/* --- 编译器内建(clang 全支持) --- */
|
||
#define HAVE_DECL___BUILTIN_CTZ 1
|
||
#define HAVE_DECL___BUILTIN_BSWAP64 1
|
||
|
||
/* --- Darwin/iOS 存在的头文件 --- */
|
||
#define HAVE_LANGINFO_H 1
|
||
#define HAVE_SYS_UIO_H 1
|
||
#define HAVE_PATHS_H 1
|
||
#define HAVE_UTIL_H 1
|
||
#define HAVE_UTMPX_H 1
|
||
|
||
/* --- Darwin/iOS 存在的函数 --- */
|
||
#define HAVE_POSIX_MEMALIGN 1
|
||
#define HAVE_PSELECT 1
|
||
#define HAVE_CFMAKERAW 1
|
||
#define HAVE_FORKPTY 1
|
||
|
||
/* 说明:IP_MTU_DISCOVER / IP_RECVTOS(Linux only) 与 HAVE_IUTF8 均以 #ifdef 判定,
|
||
* 此处不定义即自动跳过(network.cc 相关分支只在 Linux 生效;HAVE_IUTF8 仅被
|
||
* 已排除的 mosh-server.cc/stmclient.cc 使用)。 */
|
||
|
||
#endif /* MOSH_TX_CONFIG_H */
|