全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:3154
推到 Plurk!
推到 Facebook!

請問一下關於 idftp 的proxy 問題

尚未結案
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-09-17 11:26:42 IP:209.91.xxx.xxx 未訂閱
請問一下關於 idftp 的proxy 問題 我想用 isp 提供的 proxy 下載 ftp 中的檔案, 如果不加 proxy 的那些設定是正常無誤的, 加上以後卻出現 , " connection close gracefully" 不知是那錯了?? 用的是 delphi 6, 請各位前輩指點一下 , 謝謝~~ procedure TForm1.BitBtn1Click(Sender: TObject); var i:longint;aADest: TMemoryStream ; aAResume:boolean; begin aadest:=TMemoryStream .Create; tFTP.Host := 'ftp.isu.edu.tw'; tFTP.Port := 21; tFTP.Username := 'anonymous'; tftp.ProxySettings.ProxyType:=fpcmHttpProxyWithFtp; tftp.ProxySettings.Host:='139.175.55.210'; //proxy.seed.net.tw:8080 tftp.ProxySettings.Port:=8080; tFTP.Connect; tftp.get('welcome.msg',aadest,aaresume); aadest.SaveToFile('c:\zget.gm'); end; 另外要怎樣才能作出像 flashget 一樣, show 出連線的資訊?? , 那些資料在那里回傳的呢? 不好意思, 新手問題...
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-09-17 11:32:46 IP:211.22.xxx.xxx 未訂閱
請多用搜尋功能~
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-09-17 14:11:45 IP:209.91.xxx.xxx 未訂閱
剛去看了一下討論區的資料, 可是好像只講到 那是因為 server 端所斷線的 , 但要怎麼避免被斷線呢 ? 另外 我用了 TIdLogEvent 來看連線狀況, 只要有加上 proxy 就沒反應說??
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#4 引用回覆 回覆 發表時間:2005-09-17 14:28:30 IP:211.22.xxx.xxx 未訂閱
引言: 剛去看了一下討論區的資料, 可是好像只講到 那是因為 server 端所斷線的 , 但要怎麼避免被斷線呢 ?
當Client與Server間沒有任何動作時,每隔一段時間呼叫: idFTP.Noop; 發表人 - stallion 於 2005/09/17 14:29:20
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#5 引用回覆 回覆 發表時間:2005-09-17 16:12:30 IP:59.104.xxx.xxx 未訂閱
好像不是耶..... procedure TForm1.IdLogEvent1Received(ASender: TComponent; const AText, AData: String); begin memo1.Lines.Add(adata); end; 我加了這些去看連線 , 如果不加 // tftp.ProxySettings.ProxyType:=fpcmTransparent; // tftp.ProxySettings.Host:='139.175.55.210'; //proxy.seed.net.tw:8080 // tftp.ProxySettings.Port:=8080; 這三行就者正常 , 且有連線資料如下: Memo1 220-歡迎光臨義守大學檔案伺服器 220- 220-本站提供以下軟體可供下載: 220-******************************************************************************* 220-/pub/BeOS/ BeOS 作業系統 220-/pub/CPAN/ Perl 程式語言 (Comprehensive Perl Archive Network) 220-/pub/CPatch/ 中文化軟體 (收集大量的 Windows 共享軟體與中文化程式) 220-/pub/Documents/ 各類文件收集 220-/pub/FreeBSD/ FreeBSD 作業系統 220-/pub/Game/ 免費遊戲軟體 220-/pub/Hardware/ 硬體驅動程式 220-/pub/Linux/ Linux 作業系統 220-/pub/MsDownload/ 微軟相關軟體更新 (例如 Service Pack 等) 220-/pub/RFC/ Request for Comments (RFC 文件) 220-/pub/Solaris/ Solaris 作業系統 220-/pub/Yesterday/ 昨日小築完整 mirror (收集大量 Windows 相關軟體) 220-******************************************************************************* 220- 220-另外,歡迎使用者多多利用 HTTP 的方式登入,一來有較佳的 220-傳輸效能,介面功能也較為完善,您還可以利用檔案搜尋引擎 220-快速找到您所需求的檔案,網址如下: 220- 220-http://ftp.isu.edu.tw 220 230 Login successful. 200 Switching to Binary mode. 215 UNIX Type: L8 350 Restart position accepted (1). 350 Restart position accepted (0). 200 PORT command successful. Consider using PASV. 350 Restart position accepted (0). 150 Opening BINARY mode data connection for welcome.msg (914 bytes). 226 File send OK. 200 NOOP ok. 200 NOOP ok. 200 NOOP ok. 但是只要一加上 proxy 的那 3 行 , 連線資料也都收不到, 就出現 " connection close gracefully" 了
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#6 引用回覆 回覆 發表時間:2005-09-18 00:53:24 IP:211.22.xxx.xxx 未訂閱
1.FTP Proxy我沒用過,為何TIdLogEvent經由proxy就不會顯示伺服端訊息,個人很好奇 >>
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#7 引用回覆 回覆 發表時間:2005-09-18 02:24:10 IP:203.67.xxx.xxx 未訂閱
我試過了 , 執行編譯過的exe 也是會出現吧?? .....不過這不重要反正只要正能常連線的話,再解決就好 問題應是那個 proxy 的部分, 我一直在想是那裡設定錯了.....? 會不會是連上 proxy(139.175.55.210:8080) 後, 沒法子和 proxy 溝通所以才沒有資料?? 不好意思, 第一次寫有關網路的, 實在弄不懂... 我把程式 post 上來, 看能幫忙找到原因嗎...? procedure TForm1.BitBtn1Click(Sender: TObject); var i:longint;aADest: TMemoryStream ; aAResume:boolean; begin aadest:=TMemoryStream .Create; tFTP.Host := 'ftp.isu.edu.tw'; tFTP.Port := 21; tFTP.Username := 'anonymous'; tftp.ProxySettings.ProxyType:=fpcmHttpProxyWithFtp; tftp.ProxySettings.Host:='139.175.55.210'; //proxy.seed.net.tw:8080 tftp.ProxySettings.Port:=8080; tFTP.Connect; tftp.get('welcome.msg',aadest,aaresume); tftp.Noop; tftp.Noop; tftp.Noop; aadest.SaveToFile('c:\zget.gm'); end; procedure TForm1.IdLogEvent1Received(ASender: TComponent; const AText, AData: String); begin memo1.Lines.Add(adata); end; procedure TForm1.IdLogEvent1Sent(ASender: TComponent; const AText, AData: String); begin listbox2.Items.Add(adata); end; procedure TForm1.IdLogEvent1Connect(ASender: TIdConnectionIntercept); begin form1.caption:='connection'; end;
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#8 引用回覆 回覆 發表時間:2005-09-18 11:30:52 IP:211.22.xxx.xxx 未訂閱
procedure TForm1.BitBtn1Click(Sender: TObject);
var i:longint;aADest: TMemoryStream ;    aAResume:boolean;
begin    aadest:=TMemoryStream .Create;
  tFTP.Host := 'ftp.isu.edu.tw';
  tFTP.Port := 21;
  tFTP.Username := 'anonymous';
  
  tftp.ProxySettings.ProxyType:=fpcmHttpProxyWithFtp;
  tftp.ProxySettings.Host:='139.175.55.210'; //proxy.seed.net.tw:8080
  tftp.ProxySettings.Port:=8080;
  
  tFTP.ProxySettings.UserName := 'XXX';
  tFTP.ProxySettings.Password := '123';
        tFTP.Connect;
    tftp.get('welcome.msg',aadest,aaresume);
    tftp.Noop;
    tftp.Noop;
    tftp.Noop;
    aadest.SaveToFile('c:\zget.gm');
end;
ProxyType is a TIdFtpProxyType property that represents the connection and authentication methods permitted for proxied connections to an FTP server. ProxyType is used in TIdFTP.Login to determine the method and values used for authenticating the proxied connection to the FTP server, according to the following proxy type values and methodologies: fpcmNone - Sends the FTP client Username and optional Password. fpcmUserSite - Sends the ProxySettings Username and optional Password, followed immediately by the FTP client Username and optional Password. fpcmSite - Sends the ProxySettings Username and optional Password, sends the SITE command and the FTP Host property, and the FTP client Username and optional Password. fpcmOpen - Sends the ProxySettings Username and optional Password, sends the OPEN command with the FTP Host property, and the FTP client Username and optional Password. fpcmUserPass - Calls SendCmd with the command USER user@proxyuser@host, calls SendCmd with the command PASS pwd@proxypwd, or optionally PASS pwd. fpcmTransparent - Sends the ProxySettings Username and optional Password, followed immediately by the FTP client Username and optional password. fpcmHttpProxyWithFtp - Not implemented at this time. 看看線上說明,你是不是少了ftp proxy的帳號密碼?登入proxy有些也是要帳號密碼的吧! ---------------------------------------------- We will either find a way, or make one. -Hannibal -。
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#9 引用回覆 回覆 發表時間:2005-09-18 15:00:20 IP:203.67.xxx.xxx 未訂閱
有一些 proxy公開匿名的, 不需登入 像 148.245.172.99:80(http) , 12.173.217.130:65208(http) 就是 剛看到一下 tftp.ProxySettings.ProxyType:= 全部好像都是要送 username/ pass 的樣子...? 表示 idftp 不支援匿名 proxy ??
蜻蜓草
一般會員


發表:22
回覆:30
積分:10
註冊:2002-03-18

發送簡訊給我
#10 引用回覆 回覆 發表時間:2005-10-01 01:52:29 IP:59.104.xxx.xxx 未訂閱
雖然問題沒有全部解決, 不過還是謝謝 Stallion 兄的指點~~
Ktop_Robot
站務副站長


發表:0
回覆:3511
積分:0
註冊:2007-04-17

發送簡訊給我
#11 引用回覆 回覆 發表時間:2007-04-26 13:50:31 IP:000.000.xxx.xxx 未訂閱
提問者您好:


以上回應是否已得到滿意的答覆?


若已得到滿意的答覆,請在一週內結案,否則請在一週內回覆還有什麼未盡事宜,不然,
將由版主(尚無版主之區域將由副站長或站長)自由心證,選擇較合適之解答予以結案處理,
被選上之答題者同樣會有加分獎勵同時發問者將受到扣 1 分的處分。不便之處,請見諒。


有問有答有結案,才能有良性的互動,良好的討論環境需要大家共同維護,感謝您的配合。

------
我是機器人,我不接受簡訊.
系統時間:2024-05-11 1:51:41
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!