公有云安装Panabit 专业版 笔记 Release date: Dec 22,2022 Th . Panabit Version: R0.00[TANG(大唐)r3],Build date 20221031.132102 [Linux 3.10]Author: Duke Hsu 此笔记记录了使用单网卡轻量云服务器安装panabit的过程。 准备工作 云服务器 操作系统: Centos 7.6 x64配置: 2C 8G 1 eth Panabit 材料 Panabit一键上传 云服务器工具(包含安装和解压 GUI.exe)Panabit专业版Linux安装包(LPanabitOEM_WUDAIr1_20201125_Linux3.tar.gz)云服务器的IP地址和密码云服务器需要开启SSH 端口和服务 安装步骤 云服务器初始化 关闭防火墙 #停止防火墙 systemctl stop firewalld #关闭开机自启动 systemctl disable firewalld 检查网卡配置 #打印IP地址信息 ifconfig #查看网卡详细信息(ifcfg-eth0为网卡名,有些不一样,视情况而定) cat /etc/sysconfig/network-scripts/ifcfg-eth0 记录下来IP地址信息以备稍后做Panabit配置使用 Panabit安装 使用GUI.exe 工具根据提示 将安装包上传到云服务器 全自动安装 重启服务器之后即可使用web登入Panabit进行管理 如果无法访问请检查管理口名称是否与云服务器网卡名不一致 如果提示安全问题,请使用低版本的chrome浏览器访问,比如360急速浏览器 Panabit 配置 网络接口配置 在将eth接口方向更改为接外 在应用路由-接口线路-WAN线路 添加一个接口 如下图 请注意 WAN线路的IP地址是填写云服务器的内网地址 需要克隆mac地址 使用ping来验证配置是否正确有效 SD-WAN配置 在panabit中 他们把整合进panabit的sd-wan功能称为 iWAN服务,win客户端基于gretunnel协议(wintun.dll)进行与服务端通信(若有误请删除) Panabit 的SD-WAN服务端配置 用户认证-账号管理-组织构架创建组织构架> 添加用户组 >为用户组设置地址池 用户认证-账号管理-组织构架-本地账号添加用户账号-设定用户组-其它信息 应用路由-iWAN服务-服务列表 新增一个iWAN服务-设置服务名称和网关(服务网关和地址池不能与其他内网冲突) 应用路由-iWAN服务-服务映射 将你设置好的服务名称。设置好你需要的服务端口,然后点击添加即可 请注意 需要在云服务防火墙中配置允许改端口访问权限 UDP&TCP 应用路由-策略路由-IPv4路由 添加一个策略将iWAN的服务网关转发到WAN(如果你有多条线路可以设置你想要的线路) 跟着以上步骤,Pnabait的SD-WAN服务端就配置完成了。在客户端,Pnabit提供了多平台,多方式的连接方案 Linux客户端 Windows客户端 Panabit所有版本 都有提供iWAN接口的选项 SD-WAN客户端连接 Panabit设备 应用路由-接口线路-WAN线路 新增一条iWAN类型的外网线路 ,设置好服务端地址和端口以及MTU ,账号密码,连通之后你可以使用ping来验证是否工作。 请注意 如果无法连接 请检查服务端地址池配置是否有冲突 账号密码是否不正确 云服务防火墙是否已经配置并允许服务端口 无法上网请检查应用路由中的策略路由是否配置了转发 至此,在公有云中安装Panabit并配置SD-WAN的笔记就完成了。我使用一张网卡配置完成SD-WAN 比官方说明的需求的3-4张网卡成本更低。当然目前业务量小,还没出现问题。不知道到当业务量大了之后会不会出现其它问题。

December 22, 2022 1comments 485hotness 0likes Read all

由于某些游戏在运行时候会检测显卡驱动版本,如果不是最新版本就需要更新,某些时候太麻烦了,索性使用批处理更改文件名来实现跳过显卡驱动版本检测。下面的示例以Windows操作系统为主。 Tips: 将下面的命令保存为批处理(bat)格式的文件即可在Windows下执行。 重命名NVAPI文件 if exist C:\Windows\System32\nvapi64.Old goto Old chdir /d C:\Windows\System32 ren nvapi64.dll nvapi64.Old echo @ Named pause goto End 恢复NVAPI文件名 :Old chdir /d C:\Windows\System32 ren nvapi64.Old nvapi64.dll echo @ Renamed pause goto End :End

November 17, 2022 0comments 263hotness 0likes Read all

TCPING介绍 tcping 是由美国人 Eli Fulkerson先生用C++ 编写的一个开源网络检测工具;你可以下载可执行文件, 也可以下载源码自行编译。 Offical website: https://download.elifulkerson.com/files/tcping/0.39/ tcping和ping类似,也是用于检测网络连通性的一个工具。不同于ping的是,tcping 可以检查端口,更多的用法请在程序中执行 ? 来查阅。 程序的帮助信息 使用tcping检测应用程序的端口延迟 从Eli Fulkerson 的网站下载下来,通过命令行的方式来运行 在程序所在目录输入程序 和目标地址进行检测 .\tcping.exe google.com 443 //.\tcping.exe 目标地址/域名 目标端口 即可获得结果,也可以在程序后面添加参数 .\tcping.exe -t google.com 443 //.\tcping.exe -t 目标地址/域名 目标端口 (-t长ping) .\tcping.exe -h google.com //.\tcping.exe -h 目标地址/域名 目标端口 示例图 使用tcping来检查网络游戏的网络波动 当我接到有用户反馈网络游戏延迟高或者连接不上的时候,通常我会使用tcping,tracert,nslookup,ping 这几个命令来协助排查故障;总结一下几个步骤如下 拿到与游戏相关的服务器地址有时候游戏服务器是通过域名连接,我会使用nslookup检查解析地址 使用ping检查基本的延迟状态有些游戏服务器禁ping,我会使用tracert 来跟踪路由,顺便找一下游戏连接的端口(后面使用tcping检查端口) 使用tracert跟踪路由运营商链路调整 有时候会影响游戏体验;某个节点断掉tracert可以协助你判断路由节点的问题 使用tcping检查游戏服务器端口延迟和是否开放有些游戏是UDP协议,我会用hping,或者nc。基本上tcping已经很够用所以我这里只介绍tcping。 前面的文章 使用 PsPing进行网络测试https://www.itiohub.com/share/psping.html 以上所述内容均以Windows操作系统为主。如果你有其它更好用的工具 ,欢迎在下方留言分享。

November 15, 2022 0comments 244hotness 0likes Read all

What is Classes in C#? Objects Access Modifiers https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/access-modifiers https://www.cnblogs.com/xinaixia/p/5775471.html Code using System; //class declaration public class Car { //instance 6 variables String name; String color; String transmission; String bodytype; int seat; int year; //constructor declaration of class public Car(String name, String color, String transmission, String bodytype, int seat, int year) { this.name = name; this.color = color; this.transmission = transmission; this.bodytype = bodytype; this.seat = seat; this.year = year; } //property 6 public String getName() { return name; } public String getColor() { return color; } public String getTransmission() { return transmission; } public String getType() { return bodytype; } public int getSeat() { return seat; } public int getYear() { return year; } //method public String ToString() { return ("This is Car detail- CarName:" + this.getName() + "\n Color :" + this.getColor() + "\n Transmission: " + this.getTransmission() + "\n Body type: " + this.getType() + "\n Seat : " + this.getSeat() + "\n Year: " + this.getYear())+"\n ================="; } //main method public static void Main(string[] args) { // 5 object Car Toyota = new Car("Toyota Rush", "Silver", "Auto", "SUV", 7, 2020); Car Bmw = new Car("BMX X1", "Silver", "Auto", "SUV", 7, 2022); Car Honda = new Car("Accord", "Black", "Auto", "Sedan", 4, 2016); Car Tesla = new Car("Tesla S", "Red", "Auto", "Sedan", 4, 2017); Car Mazda = new Car("Mazda 929 Legato", "White", "Manual", "Sedan", 4, 1980); //output Console.WriteLine(Toyota.ToString()); Console.WriteLine(Bmw.ToString()); Console.WriteLine(Honda.ToString()); Console.WriteLine(Tesla.ToString()); Console.WriteLine(Mazda.ToString()); Console.WriteLine("==============\n Thank you !"); //out put date and time DateTime now = DateTime.Now; Console.WriteLine("Print date: " + now); Console.ReadLine(); } }

October 20, 2022 0comments 332hotness 0likes Read all

IDEA User input data Convert to index Using index number fund element vaule Output element vaule Screenshot Code using System; namespace array2d { public class array2d { public static void Main(string[] args) { //initilizing arrays string[,] platenumber = new string[5,3] { {"ZJI163","USA1008","PHA101"}, {"PJ130108", "USA1006","JAP118" }, {"MAX168", "USA1002" ,"TWD120"}, { "AZZ9756", "USA1005","KOR119" }, {"NAS1223","USA109","DDT886"} }; //wait for user input,convert to int Console.WriteLine("Welcome use DK parking system!\n Solt: 0-4 \n floor: 0-2"); Console.WriteLine("Plz type slot: "); int solt = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Plz type floor: "); int floor = Convert.ToInt32(Console.ReadLine()); // decision the length of the element if (solt < 5 && floor < 3) { string car = platenumber[solt, floor]; Console.WriteLine("Found platenumber is :" + car); } else { Console.WriteLine("\nThe value you entered does not exist"); } Console.WriteLine("Thank you !"); Console.ReadLine(); } } }

October 16, 2022 0comments 250hotness 0likes Read all

C# Multidimensional Arrays As discussed in the previous chapter, Arrays in C# will support multi-dimensional arrays. In c#, a multidimensional array is an array that contains more than one dimension to represent the elements in a tabular format like rows and columns.In c#, multidimensional arrays can support either two or three-dimensional series. To create multi-dimensional arrays, we need to use a comma (,) separator inside the square brackets. C# Multi-Dimensional Array Declaration In c#, Multidimensional Arrays can be declared by specifying the data type of elements followed by the square brackets [] with comma (,) separator. The following are examples of creating two or three-dimensional arrays in the c# programming language. Question: Create a complete C# program that will compute the average of all elements in array x int [,] x = new int[4, 5] { { 4, 5, 6, 2, 12 }, { 10, 25, 33, 22, 11 },{ 211, 32, 43, 54, 65 }, { 3, 2, 1, 5, 6 } }; Average Solution Use for loop get array x elements values Add values Divide results by no. of values Code using System; namespace Module7 { public class Module7 { public static void Main(string[] args) { //initilizing array int[,] x = new int[4, 5] { { 4, 5, 6, 2, 12 }, { 10, 25, 33, 22, 11 }, { 211, 32, 43, 54, 65 }, { 3, 2, 1, 5, 6 } }; Console.WriteLine("---Two dimensional array elements---"); // use for loop get array x elements for(int y=0; y<4; y++) { int sum = 0; double avg =…

October 4, 2022 0comments 262hotness 0likes Read all

Question: Create a complete C# program that will simulate a log-in process. If the username and password are both correct the program will display “Log-in Successful”, otherwise it will display “Invalid Log-in details” FlowChart: C# Logical Operators: Code Answer: using System; namespace Module6 { class module6 { static void Main(string[] args) { string emailid, password; //use readline get user input Console.WriteLine("Plz enter u Emaill address :"); emailid = Console.ReadLine(); Console.WriteLine("Plz enter u Password"); password = Console.ReadLine(); //use if else to decision input data contains value if (emailid.Contains("[email protected]") && (password.Contains("d123456"))) { Console.WriteLine("Your Log-in Was Successful!"); } else { Console.WriteLine("Invalid Log-in details"); } Console.ReadLine(); } } } Reference C# Logical Operators with Exampleshttps://www.tutlane.com/tutorial/csharp/csharp-logical-operators-with-examples C# String Contains()https://www.javatpoint.com/csharp-string-contains

October 3, 2022 0comments 299hotness 0likes Read all

此博文记录了如何在网页中简单提取视频源地址的方法,起因是STS 课程中有一个Assessment是要观看影片去回答问题。Youtube没有资源,网页操作不方便,我想把他放到VLC中播放。 软件环境 Chrome浏览器 VLC打开网络链接(视频源地址 M3U8) Windows 10 操作步骤 使用Chrome浏览器在视频播放页面按F12进入开发模式(如上图所示)。 在控制台找到Network 在搜索框输入M3U8 复制Request URL中的值在VLC中打开即可 Reference: How do we download a blob url video [closed] https://stackoverflow.com/questions/42901942/how-do-we-download-a-blob-url-video 如何下载 blob 地址的视频资源 https://www.cnblogs.com/mq0036/p/14953209.html

September 30, 2022 1comments 383hotness 0likes Read all

Create an new windwos forms project. Design Size. Add panel. design panel color,size,style. Add button. calculartor button and oper button. Coding button function. Declaring variables double fstNum,secNum; string oper; Identify button function btnCE private void btnCE_Click(object sender, EventArgs e) { textDisplay.Text = "0"; string f, s; f = Convert.ToString(fstNum); s = Convert.ToString(secNum); f = ""; s = ""; } backspace private void backspace_Click(object sender, EventArgs e) { if (textDisplay.Text.Length > 0) { textDisplay.Text = textDisplay.Text.Remove(textDisplay.Text.Length - 1, 1); } if (textDisplay.Text == "") { textDisplay.Text = "0"; } } btn9 private void btn9_Click(object sender, EventArgs e) { if (textDisplay.Text == "0") { textDisplay.Text = "9"; } else { textDisplay.Text = textDisplay.Text + "9"; } } btnAdd private void btnAdd_Click(object sender, EventArgs e) { fstNum = double.Parse(textDisplay.Text); oper = "+"; textDisplay.Text = ""; } btnPM private void btnPM_Click(object sender, EventArgs e) { double q = Convert.ToDouble(textDisplay.Text); textDisplay.Text = Convert.ToString(-1 * q); } btnC private void btnC_Click(object sender, EventArgs e) { textDisplay.Text = "0"; } benDec private void benDec_Click(object sender, EventArgs e) { if (benDec.Text == ".") { if (!textDisplay.Text.Contains(".")) { textDisplay.Text = textDisplay.Text + benDec.Text; } } } use switch statement out put equal private void btnEuq_Click(object sender, EventArgs e) { secNum = double.Parse(textDisplay.Text); switch (oper) { case "+": textDisplay.Text = (fstNum + secNum).ToString(); break; case "-": textDisplay.Text = (fstNum - secNum).ToString(); break; case "*": textDisplay.Text = (fstNum * secNum).ToString(); break; case "/": textDisplay.Text = (fstNum / secNum).ToString(); break; default: break; } } Code download:caluclator.zip Reference:

September 25, 2022 0comments 242hotness 0likes Read all

Example explainedLine 1: using System means that we can use classes from the System namespace. Line 2: A blank line. C# ignores white space. However, multiple lines makes the code more readable. Line 3: namespace is used to organize your code, and it is a container for classes and other namespaces. Line 4: The curly braces {} marks the beginning and the end of a block of code. Line 5: class is a container for data and methods, which brings functionality to your program. Every line of code that runs in C# must be inside a class. In our example, we named the class Program. Don't worry if you don't understand how using System, namespace and class works. Just think of it as something that (almost) always appears in your program, and that you will learn more about them in a later chapter. Line 7: Another thing that always appear in a C# program, is the Main method. Any code inside its curly brackets {} will be executed. You don't have to understand the keywords before and after Main. You will get to know them bit by bit while reading this tutorial. Line 9: Console is a class of the System namespace, which has a WriteLine() method that is used to output/print text. In our example it will output "Hello World!". If you omit the using System line, you would have to write System.Console.WriteLine() to print/output text. Note: Every C# statement ends with a semicolon ;. Note: C# is case-sensitive: "MyClass" and "myclass" has different meaning. Note: Unlike Java, the…

September 24, 2022 0comments 220hotness 0likes Read all
13456713