NMHTTP控件为什么会返回的主机IP是代理服务器的IP地址?请高手帮忙(50分)

  • 主题发起人 主题发起人 citybug-nj
  • 开始时间 开始时间
C

citybug-nj

Unregistered / Unconfirmed
GUEST, unregistred user!
我使用NMHTTP控件做测试,代码如下:
代理服务器用的是WINgate,IP是:202.102.13.2 端口是:8078
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Psock, NMHttp, ComCtrls, StdCtrls;

type
TForm1 = class(TForm)
NMHTTP1: TNMHTTP;
StatusBar1: TStatusBar;
Label1: TLabel;
Label2: TLabel;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
nmhttp1.Proxy :='202.102.13.2';
nmhttp1.ProxyPort :=8078;
//nmhttp1.Host :='www.sina.com.cn/index.asp';
nmhttp1.Port :=80;
nmhttp1.ReportLevel :=1;
nmhttp1.InputFileMode :=false;
nmhttp1.OutputFileMode :=false;
nmhttp1.Connect ;
statusbar1.Panels [0].Text :='连接上新浪网!';
label1.Caption :=nmhttp1.RemoteIP;
label2.Caption :=nmhttp1.LocalIP ;
//nmhttp1.Get('www.njcein.com.cn/index.asp');
memo1.Lines.Add (nmhttp1.Header);
memo1.Lines.Add (nmhttp1.Body);
end;

end.


为何LABEL1中显示的是代理的IP,主机IP却没有,请高手指点
 
后退
顶部