-
大小: 10.97MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-10-10
- 語(yǔ)言: 其他
- 標(biāo)簽: LhSocket5Net??Socket5Proxy??Socket5??
資源簡(jiǎn)介
LhSocket5Net 是一款為開(kāi)發(fā)人員用于在windows系統(tǒng)下假設(shè)Socket5服務(wù)器的支持庫(kù)。
支持 Socket4,Socket4A,Socket5 協(xié)議傳輸,并提供對(duì)UDP代理的操作。
開(kāi)發(fā)人員可指定本地服務(wù)器IP與端口進(jìn)行架設(shè),支持用戶權(quán)限的校驗(yàn),可對(duì)用用戶鏈接數(shù)量速度等進(jìn)行相關(guān)控制。
LhSocket5Net提供COM對(duì)象接口,可用于任意第三方開(kāi)發(fā)平臺(tái)進(jìn)行集成開(kāi)發(fā),服務(wù)器的
架設(shè)簡(jiǎn)單以便并提供完整代碼演示。
支持庫(kù)進(jìn)行了高效的校驗(yàn)與開(kāi)發(fā)具有較好的兼容性完善性適宜各類相關(guān)內(nèi)部集成使用。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
namespace?CTestServer
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????public?LhSocket5Net.lhSocket5Proxy?VLhProxy?=?null;
????????public?LhSocket5Net.LhProxy?VlhSocket5=null;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????//官方主頁(yè):?http://www.lanheng.net/ProductContent/40
????????????//產(chǎn)品下載:http://www.lanheng.net/ProductContent/40/87
????????????VLhProxy?=?new?LhSocket5Net.lhSocket5Proxy();
????????????//免費(fèi)賬號(hào)注冊(cè)地址??
????????????//http://count.lanheng.net/user/Register.aspx?id=84383
????????????//產(chǎn)品信息地址
????????????//請(qǐng)先進(jìn)行登錄之后在創(chuàng)建代理????請(qǐng)?jiān)谏戏降刂分猩暾?qǐng)賬號(hào)
????????????if?(?VLhProxy.UserLogin(“********“?“********“)==false){?MessageBox.Show(“用戶登錄失敗!“?““?MessageBoxButtons.OK);?return;?}?else{??}
????????????//參數(shù)1?本地服務(wù)器代理IP地址
????????????//參數(shù)2?本地服務(wù)器代理端口
????????????//參數(shù)3?客戶端用來(lái)連接的賬號(hào)?如果為瀏覽器提供代理?請(qǐng)不要設(shè)置?賬號(hào)與密碼
????????????//參數(shù)4?客戶端用來(lái)連接的密碼?如果為瀏覽器提供代理?請(qǐng)不要設(shè)置?賬號(hào)與密碼
????????????//參數(shù)5?是否支持UDP代理支持
????????????//參數(shù)6?充許同時(shí)處理的連接數(shù)??默認(rèn)為100??0為不限
????????????//參數(shù)7?限制代理端口?例如限制代理目標(biāo)端口??802524?等
????????????//參數(shù)8?限制最大下行可用帶寬??單位KB????0為不限
????????????//參數(shù)9?限制最大上行可用帶寬??單位KB????0為不限
????????????VlhSocket5?=?VLhProxy.CreatePorxy(“192.168.1.116“?8080?““?““?true?100?““?0?0);
????????if?(VlhSocket5?==?null)?{?MessageBox.Show(“代理建立失敗:請(qǐng)查看錯(cuò)誤日“);?return;?};
????????????Label2.Text?=?String.Format(“本地代理IP:{0}??本地端口:{1}“?VlhSocket5.VIp?VlhSocket5.VPort.ToString());
????????????Label4.Text?=?String.Format(“用戶鏈接賬號(hào):{0}???密碼:{1}“?VlhSocket5.VUserName?VlhSocket5.VUserPassword.ToString());
????????????Label5.Text?=?String.Format(“是否啟動(dòng)Udp支持:{0}“VlhSocket5.VIsUdp.ToString());
????????????Label6.Text?=?String.Format(“限制最大上行:{0}??限制最大下行:{1}“?VlhSocket5.MaxSpeedUpdate.ToString()?VlhSocket5.MaxSpeedDown.ToString());
????????????Label7.Text?=?String.Format(“最大充許同時(shí)處理連接數(shù):{0}“VlhSocket5.ActivityCountMax.ToString());
????????????Label8.Text?=?String.Format(“是否開(kāi)啟日志功能:{0}“VLhProxy.IsEanbleErrorLog.ToString());
????????????//關(guān)閉代理
????????????//VlhSocket5.CloseProxy
????????????//返回當(dāng)前操作的上行與下行時(shí)時(shí)速度
????????????//VlhSocket5.GetSpeed
????????????//返回當(dāng)前鏈接的數(shù)量
????????????//VlhSocket5.ActivityCount
????????????//獲取本地所有IP列表
????????????//VLhProxy.GetAllLocalAllIp()
????????????//獲取一個(gè)本地未被使用的端口
????????????//VLhProxy.GetRandomNoUsePort()
????????????//是否開(kāi)啟日志功能???默認(rèn)開(kāi)啟狀態(tài)
????????????//VLhProxy.IsEanbleErrorLog
????????}
????????private?void?Timer1_Tick(object?sender?EventArgs?e)
????????{
????????????if?(VlhSocket5?==?null)?{?return;?};
????????????Label1.Text?=?“當(dāng)前速度?上行:“?+?VlhSocket5.GetSpeed().UpdateSpeed.ToString()?+?“KB?下行:“?+?VlhSocket5.GetSpeed().DownSpeed.ToString()?+?“KB“?+?“??Conn:“?+?VlhSocket5.ActivityCount.ToS
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????10752??2016-10-22?10:17??Demo\C#\CTestServer\bin\Debug\CTestServer.exe
?????文件??????22696??2016-10-22?10:16??Demo\C#\CTestServer\bin\Debug\CTestServer.vshost.exe
?????文件????????490??2015-07-10?19:01??Demo\C#\CTestServer\bin\Debug\CTestServer.vshost.exe.manifest
?????文件?????790016??2016-10-21?20:13??Demo\C#\CTestServer\bin\Debug\LhSocket5Net.dll
?????文件??????95744??2016-10-21?20:13??Demo\C#\CTestServer\bin\Debug\LhSocket5Net.pdb
?????文件???????4076??2016-10-20?12:40??Demo\C#\CTestServer\bin\Debug\LhSocket5Net.xm
?????文件???????4028??2016-10-21?16:05??Demo\C#\CTestServer\CTestServer.csproj
?????文件???????3793??2016-10-21?16:14??Demo\C#\CTestServer\Form1.cs
?????文件???????5959??2016-10-20?17:22??Demo\C#\CTestServer\Form1.Designer.cs
?????文件???????6011??2016-10-20?17:22??Demo\C#\CTestServer\Form1.resx
?????文件???????4827??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.csproj.FileListAbsolute.txt
?????文件???????1012??2016-10-20?17:22??Demo\C#\CTestServer\obj\Debug\CTestServer.csproj.GenerateResource.Cache
?????文件??????24175??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.csprojResolveAssemblyReference.cache
?????文件??????10752??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.exe
?????文件????????180??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.Form1.resources
?????文件??????22016??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.pdb
?????文件????????180??2016-10-22?10:17??Demo\C#\CTestServer\obj\Debug\CTestServer.Properties.Resources.resources
?????文件????????864??2016-10-21?16:06??Demo\C#\CTestServer\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????7144??2016-10-22?10:16??Demo\C#\CTestServer\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????492??2016-10-20?17:05??Demo\C#\CTestServer\Program.cs
?????文件???????1330??2016-10-20?17:05??Demo\C#\CTestServer\Properties\AssemblyInfo.cs
?????文件???????2835??2016-10-20?17:05??Demo\C#\CTestServer\Properties\Resources.Designer.cs
?????文件???????5612??2016-10-20?17:05??Demo\C#\CTestServer\Properties\Resources.resx
?????文件???????1098??2016-10-20?17:05??Demo\C#\CTestServer\Properties\Settings.Designer.cs
?????文件????????249??2016-10-20?17:05??Demo\C#\CTestServer\Properties\Settings.settings
?????文件???????1490??2016-10-21?11:50??Demo\C#\CTestServer.sln
?????文件??????16384??2016-10-22?10:17??Demo\C#\CTestServer1\bin\Debug\CTestServer1.exe
?????文件??????22696??2016-10-20?18:32??Demo\C#\CTestServer1\bin\Debug\CTestServer1.vshost.exe
?????文件????????490??2015-07-10?19:01??Demo\C#\CTestServer1\bin\Debug\CTestServer1.vshost.exe.manifest
?????文件?????790016??2016-10-21?20:13??Demo\C#\CTestServer1\bin\Debug\LhSocket5Net.dll
............此處省略166個(gè)文件信息
評(píng)論
共有 條評(píng)論