Pouyan.Network
1.0.0.3
dotnet add package Pouyan.Network --version 1.0.0.3
NuGet\Install-Package Pouyan.Network -Version 1.0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pouyan.Network" Version="1.0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pouyan.Network --version 1.0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Pouyan.Network, 1.0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pouyan.Network as a Cake Addin #addin nuget:?package=Pouyan.Network&version=1.0.0.3 // Install Pouyan.Network as a Cake Tool #tool nuget:?package=Pouyan.Network&version=1.0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
<div align="center">
Pouyan.Network
</div>
Port
For getting Free Ports:
var freePorts = Pouyan.Network.Port.GetFreePorts(10);
Check a port is use by another app or not:
var result = Pouyan.Network.Port.PortIsOpen(80);
Proxy
Enable System Proxy
just work on windows
Pouyan.Network.Proxy.EnableSystemProxy("127.0.0.1",8080);
Enable System Proxy
just work on windows
Pouyan.Network.Proxy.DisableSystemProxy();
Tools
Get global network ip
var myGlobalIp = await Pouyan.Network.Tools.GetMyGlobalIpAsync();
Interface
Get Active Interfaces
return the interfaces that are enable and connected to a network
var activeInterfaces = Pouyan.Network.Interface.GetAllActiveNetworkInterfaces();
Get All Interfaces
var Interfaces = Pouyan.Network.Interface.GetAllNetworkInterfaces();
Get interface that use for primary network
var activeInterface = Pouyan.Network.Interface.GetActiveInterface();
Dns
Get dns addresses a network
var dnsAddresses = Pouyan.Network.Dns.GetDnsAddresses(networkInterface);
Get dns that use for primary interface
var dnsAddresses = Pouyan.Network.Dns.GetDnsAddressesPrimaryInterface();
Get dns that use for primary interface
var dnsAddresses = Pouyan.Network.Dns.GetDnsAddressesPrimaryInterface();
Changing Dns
- just work on windows
- Require run as administrator
var dns = IPAddress.Parse("8.8.8.8");
Pouyan.Network.Dns.ChangeDnsTo(networkInterface,dns);
Or
var primaryDns = IPAddress.Parse("8.8.8.8");
var altDns = IPAddress.Parse("1.1.1.1");
Pouyan.Network.Dns.ChangeDnsTo(networkInterface, primaryDns, altDns);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pouyan.Network:
Package | Downloads |
---|---|
Pouyan.SingBox
quieckly to create a vpn client that's support v2ray protocols |
GitHub repositories
This package is not used by any popular GitHub repositories.