Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗STUN for Java
STUN (RFC 8489 / 5389, Binding over UDP) client, server and classic NAT type discovery (RFC 3489 algorithm with RFC 5780 attributes).
try (DatagramSocket socket = new DatagramSocket()) {
StunClient client = new StunClient(socket);
// the reflexive address of this socket
InetSocketAddress mapped = client.bind(new InetSocketAddress("stun.example.com", 3478)).mappedAddress();
// OPEN_INTERNET, FULL_CONE, RESTRICTED_CONE, PORT_RESTRICTED_CONE, SYMMETRIC, SYMMETRIC_FIREWALL, UDP_BLOCKED
NatType type = client.discoverNatType(new InetSocketAddress("stun.example.com", 3478));
}
// primary 192.0.2.1:3478, alternate port 3479, alternate ip 192.0.2.2 (for CHANGE-REQUEST)
StunServer server = new StunServer(new InetSocketAddress("192.0.2.1", 3478), 3479, InetAddress.getByName("192.0.2.2")).start();
A server without an alternate ip answers "change ip" with 420, or delegates it to another server
by StunServer#setChangeIpRelay (the overlay network nodes relay to each other this way).
StunMessageTest ... RFC 5769 test vectorsNatTypeDiscoveryTest ... discovery against simulated NATs/firewalls (RFC 4787 mapping/filtering behaviors), uses 127.0.0.2IptablesFirewallTest ... discovery behind real iptables firewalls and SNAT, needs root
sudo mvn test -Dtest=IptablesFirewallTest -Dstun.iptables=true
image designed by @umjammer, drawn by nano banana