🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ZerotierLib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ZerotierLib

基于Zerotier官方安装包msi的辅助类

1.2.5
NuGet
Version published
Maintainers
1
Created
Source

注意事项: 1、需要管理员权限 2、添加nuget包后请将one.res属性修改为复制到输出

static void Main(string[] args)
{
	string nwid = "322fa7fe83dbeab2";
	Console.WriteLine("正在启动服务...");
	ZtHelper.Instance.checkAndInstallService();
	bool status = ZtHelper.Instance.QueryNetwork(nwid);
	if (!status)
	{
		Console.WriteLine($"检测到未加入网络{nwid},正在加入...");
		if (ZtHelper.Instance.JoinNetwork(nwid))
			Console.WriteLine("已成功加入网络");
		else
			Console.WriteLine("加入网络失败");
	}
	else
	{
		Console.WriteLine($"已成功连接到网络{ZtHelper.Instance.QueryNetworkName(nwid)}!");
	}

	Console.WriteLine("30秒后将退出当前网络");
	Thread.Sleep(30000);
	if (ZtHelper.Instance.LeaveNetwork(nwid))
		Console.WriteLine("退出网络成功");
	else
		Console.WriteLine("退出网络失败");

	Console.ReadLine();
}

Keywords

FAQs

Package last updated on 06 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts