Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

link2lan

A tool to help to connect UDP server behind LAN.

Feature:

  1. optimize for realtime, < 2s per reverse hole.
  2. Zero protocol overhead, extremely fast.
  3. 1-rtt, punch then exit, no daemonize.
  4. Publish over udp option, fire-and-drop.
  5. No associate punching server(with ntfy.sh or selfhost)

Network Topology

Data Stream:

 UDP client(schedule link2lan) -> Internet(raw protocol) -> UDP server(ntfy subscription trigger)

Option 1: Signal via NTFY:

link2lan(addr from stun) -> ntfy server(deploy addr info)  <- ntfy-cli(addr from stun)

Option 2: Signal via UDP:

link2lan --plan 1xx --cryptkey key -> link2lan --plan 213 --localstr "0.0.0.0:44345"" --cryptkey key --cmdpath "/path/to/handler"

!!! MUST READ !!!

If you publish via NTFY, the ntfy topic is your private SECRETE, we send plain text to that topic! Transportation is secured by HTTPS. If you don't trust public service, setup your own ntfy.sh service, also unlock rate limit.

If you publish via udp, you MUST run link2lan with --cryptkey on both server and client, and keep the system time synced, it is an encryption factor.

udpdeminer is a scheduler to trigger Link2Lan in the cookbook, you can use another alternative application to use the Link2Lan output in a format of destip:dport-sport.

Cookbook connection flow:

Before:

NAT(UDP client) -> >>> Internet(raw protocol) >>> -> PubIP(UDP server)

After

Case 1, Reverse connection:

PubIP(client) -> <<< Internet(raw protocol) <<< -> NAT(server)
PubIP(client) -> <<< Internet(raw protocol) <<< -> NAT(relay) -> PubIP(server)

Case 2, Nat Punch, experimental, unstable:

NAT3(client) -> <<< Internet(raw protocol) <<< -> NAT3(server)
NAT3(client) -> <<< Internet(raw protocol) <<< -> NAT3(relay) -> PubIP(server)

Case 3, Reverse, over WARP, protect server:

PubIP(client) -> <<< Internet(raw protocol) <<< WARP(udp over warp) -> NAT(server)

Case 4: Delivery address info via NTFY or UDP.

example: door opening, DDNS updating.

Case 5: Your personal magic combination.

About

Link2Lan: A tool to help to connect UDP server behind LAN.

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages