Skip to content

Add IP4P domain resolve support#161

Open
Wikeolf wants to merge 2 commits intodndx:mainfrom
Wikeolf:ip4p
Open

Add IP4P domain resolve support#161
Wikeolf wants to merge 2 commits intodndx:mainfrom
Wikeolf:ip4p

Conversation

@Wikeolf
Copy link
Copy Markdown

@Wikeolf Wikeolf commented Aug 9, 2024

IP4P is a method proposed by the open-source project natmap, which uses AAAA records to transmit encoded IPv4 addresses and ports. With IP4P domain resolution, users can easily achieve network penetration in NAT1 environments and perform UDP obfuscation using natmap and phantun.

This request has preliminarily implemented IP4P resolution with the help of AI tools, although the code quality may not be optimal.

info!("Remote address is: {}", remote_addr);
let ip4p_resolve = matches.get_flag("ip4p_remote");

let remote_addr = lookup_host(matches.get_one::<String>("remote").unwrap(), ip4p_resolve, ipv4_only).await;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only resolve the DNS once on program start but the use case for IP4P usually means both port and IP is dynamic and would require update from time to time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants