⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socks4.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.CommLayer.SocksSipConnection
{
    using Imps.Client.Resource;
    using System;
    using System.Net.Sockets;

    internal sealed class Socks4 : SocksBase
    {
        public Socks4(SocksSipConnectionOption option) : base(option)
        {
        }

        protected override void ConsultToProxy(string host, int port)
        {
            try
            {
                ConnectToServerSocks4Message message = new ConnectToServerSocks4Message(host, port);
                if (!ReplyRequirmentSocks4Message.Parse(base.SendSocksMessage(message)).Succeeded)
                {
                    throw new SocksConnectionException("代理服务器与最终服务器的连接失败", SocksConnectionErrorCode.ServerFailure);
                }
                base.RaiseConnectedEvent();
            }
            catch (SocketException exception)
            {
                base.RaiseFailedEvent(new SocksConnectionException("在协商过程中出现错误", exception, SocksConnectionErrorCode.ServerFailure));
            }
            catch (SocksConnectionException exception2)
            {
                base.RaiseFailedEvent(exception2);
            }
            catch (Exception exception3)
            {
                base.RaiseFailedEvent(new SocksConnectionException("与代理服务器的协商过程失败", exception3, SocksConnectionErrorCode.ServerFailure));
            }
        }

        public override string ToString()
        {
            return StringTable.ClientCommLayerString.Socks4Proxy;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -