📄 psisocks.pas
字号:
unit PsiSocks;
//******************************************************************************
// The original software is under
// Copyright (c) 1993 - 2000, Chad Z. Hower (Kudzu)
// and the Indy Pit Crew - http://www.nevrona.com/Indy/
//
// Amended : November 2000, by Michael M. Michalak MACS for use with
// MorphTek.com Inc Peer to Peer Open Source Components - http://www.morphtek.com
//
//******************************************************************************
interface
uses
Classes,
PsiStack;
type
TPsiSocksRequest = record
Version: Byte;
OpCode: Byte;
Port: Word;
IpAddr: TPsiInAddr;
UserId: String[255];
end;
TPsiSocksResponse = record
Version: Byte;
OpCode: Byte;
Port: Word;
IpAddr: TPsiInAddr;
end;
TSocksVersion = (svNoSocks, svSocks4, svSocks4A, svSocks5);
TSocksAuthentication = (saNoAuthentication, saUsernamePassword);
TSocksInfo = class(TPersistent)
protected
FAuthentication: TSocksAuthentication;
FHost: string;
FPassword: string;
FPort: Integer;
FUserID: string;
FVersion: TSocksVersion;
public
procedure Assign(Source: TPersistent); override;
published
property Authentication: TSocksAuthentication read FAuthentication write FAuthentication;
property Host: string read FHost write FHost;
property Password: string read FPassword write FPassword;
property Port: Integer read FPort write FPort;
property UserID: string read FUserID write FUserID;
property Version: TSocksVersion read FVersion write FVersion;
end;
implementation
{ TSocksInfo }
procedure TSocksInfo.Assign(Source: TPersistent);
begin
if Source is TSocksInfo then
with Source as TSocksInfo do begin
Self.Authentication := Authentication;
Self.Host := Host;
Self.Password := Password;
Self.Port := Port;
Self.UserID := UserID;
Self.Version := Version;
end
else inherited;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -