我目前陷入了一個問題,我認爲如果我使用代理,wget會嘗試通過http而不是ftp連接到服務器。因爲我不能發佈完整的設置,我會後的行爲我看到的例子:通過代理使用wget訪問ftp
訪問FTP服務器不使用代理服務器使用該命令的作用:
wget -r --user=username --password=mypassord ftp://ftp.myadress.com/
按預期工作。
訪問FTP服務器
wget -r --ftp-user=username --ftp-password=mypassord ftp://ftp.myadress.com/
工作過。
訪問與代理服務器和
wget -r --ftp-user=username --ftp-password=mypassord ftp://ftp.myadress.com/
導致
401 Unauthorized
錯誤。
使用
wget -r --user=username --password=mypassord ftp://ftp.myadress.com/
導致要創建一個index.html。不幸的是,ftp服務器在文件夾中沒有任何index.html文件。通過代理通過代理訪問文件的完整路徑
wget --user=username --password=mypassord ftp://ftp.myadress.com/test/test.txt
按預期下載文件。
通過相同的代理服務器,它與命令的每個文件夾中的一個index.html訪問不同的FTP服務器:
wget -r --user=username2 --password=mypassord2 ftp://ftp.myadress2.com/
工作正常。
那麼我如何強制wget通過代理使用ftp協議?
在此先感謝
更新:它似乎代理不能將它從FTP服務器retrives到一個index.html的.listing。因此,它創建了一個index.html,它只與父目錄有關。我可以用curl重現這種行爲,所以我認爲這是一個代理問題。 – Thorsten