Jump to content

FTP through proxy


Recommended Posts

Hi there,

I have a problem connecting to an FTP server through a proxy. I'm using this FTP UDF. Here's my code:

#include <FTP.au3>

$theFTP=_FTP_Startup()
MsgBox(0,"startup",$theFTP)

$theProxy=_FTP_Open("server",$INTERNET_OPEN_TYPE_PROXY,"192.168.1.2","192.168.1.2");this proxy is not the one I'm really using, sorry, it is confidential
MsgBox(0,"proxy",$theProxy)

$theConnection=_FTP_Connect($theProxy,"ftp.theserver.com","user","passw");of course these are not real data either
MsgBox(0,"connection",$theConnection)

Am I doing something wrong?

Did anyone succeed doing this?

Can anyone please help me?

Thanks in advance!

Link to comment
Share on other sites

Hi there,

I have a problem connecting to an FTP server through a proxy. I'm using this FTP UDF. Here's my code:

#include <FTP.au3>

$theFTP=_FTP_Startup()
MsgBox(0,"startup",$theFTP)

$theProxy=_FTP_Open("server",$INTERNET_OPEN_TYPE_PROXY,"192.168.1.2","192.168.1.2");this proxy is not the one I'm really using, sorry, it is confidential
MsgBox(0,"proxy",$theProxy)

$theConnection=_FTP_Connect($theProxy,"ftp.theserver.com","user","passw");of course these are not real data either
MsgBox(0,"connection",$theConnection)

Am I doing something wrong?

Did anyone succeed doing this?

Can anyone please help me?

Thanks in advance!

Hi,

not a solution for your code, sorry. But a simple test, if you are able to make a connect through your proxy:

In a cmd box you type: telnet <IPAdress or DNS of the ftp server> 21 (e.g telnet ftp.theserver.com 21 )

You should get a blackbox otherwise there is no connect possible and you have to proof your network-, your DNS- or your proxy configuration.

;-))

Stefan

Link to comment
Share on other sites

Hi,

not a solution for your code, sorry. But a simple test, if you are able to make a connect through your proxy:

In a cmd box you type: telnet <IPAdress or DNS of the ftp server> 21 (e.g telnet ftp.theserver.com 21 )

You should get a blackbox otherwise there is no connect possible and you have to proof your network-, your DNS- or your proxy configuration.

;-))

Stefan

Hi Stefan,

I've already checked if the proxy works, the connection is working correctly with filezilla and other ftp clients. I'm mostly sure I'm messing up something in my code, just can't figure out what...

Thanks for your help by the way!

Link to comment
Share on other sites

Hi,

as you can see in _ftp.au3 there is a funny combination:

copied from Remark section of function

; Syntax: _FTP_Open ( $sAgent [, $lAccessType [, $sProxyName [, $sProxyBypass [, $lFlags]]]] )

copied from function call itself

func _FTP_Open($sAgent, $lAccessType = 1, $lFlags = 0, $sProxyName = '', $sProxyBypass = '')

You may have to correct your syntax to the function call arguments (second copy line) and may even overwrite default function code.

;-))

Stefan

Link to comment
Share on other sites

Hi,

as you can see in _ftp.au3 there is a funny combination:

copied from Remark section of function

; Syntax: _FTP_Open ( $sAgent [, $lAccessType [, $sProxyName [, $sProxyBypass [, $lFlags]]]] )

copied from function call itself

func _FTP_Open($sAgent, $lAccessType = 1, $lFlags = 0, $sProxyName = '', $sProxyBypass = '')

You may have to correct your syntax to the function call arguments (second copy line) and may even overwrite default function code.

;-))

Stefan

Thanks Stefan, but I've tried that already, however it doesn't work.

I still haven't figured out how to do this, so I would appreciate it if anyone would help!

Thanks in advance!

b0ris

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...