This article is a mirror article of machine translation, please click here to jump to the original article.

View: 24|Reply: 0

[Console Program] .NET/C# checks if the CIDR address contains the specified IPv4 address

[Copy link]
Posted onYesterday at 21:05 | | | |
Requirements: The gateway needs to do IP blacklist and whitelist control, blacklisted IP addresses are prohibited from access, and use CIDR to set addresses, which can specify a single IP address or add IP network blocks, and only need to determine whether the requested IP address is in the CIDR.

Review:
CIDR: Read the CIDR address description in one article
https://www.itsvse.com/thread-10676-1-1.html

Reserve the IP address CIDR block of the IPv4 private network
https://www.itsvse.com/thread-10679-1-1.html

The code is as follows:
The test results are shown below:





Previous:Server Setup Using TUIC Protocol tutorial on sing-box
Next:.NET/C# Developer's Swiss Army Knife LINQPad 9 Purchase Tutorial
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com