Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use this library with a proxy? #39

Open
lukewlms opened this issue Jun 14, 2019 · 3 comments
Open

Is it possible to use this library with a proxy? #39

lukewlms opened this issue Jun 14, 2019 · 3 comments

Comments

@lukewlms
Copy link

I need to make an FTP call with a fixed IP, so I'm using Fixie Socks.

I evidently have the proxy socket opening with socksv5, but when trying to access the FTP site I get:

Error: connect ECONNREFUSED 127.0.0.1:21

Here's the code:

        SocksV5.connect(socksV5ConnectArgs, async (socket: any) => {
          try {
            const ftpOptions = {
                secureOptions: { socket },
                user: FTP_USERNAME,
                password: FTP_PASSWORD,
              }

            const promiseFtpClient = new PromiseFtp();

            // Next line fails
            const ftpPromiseResult = await promiseFtpClient.connect(ftpOptions)

            const listResult = promiseFtpClient.list();
            console.log(listResult);
          } catch (err) {
            console.log(err);
          }
        });

I've tried a number of other combinations to try and get this to work, but there's no indication if I am or am not passing the socket correctly along with the username/password combo, and I don't know what exactly is failing because the error message is vague. Is there a way to make this work? Thank you!

@chevin99
Copy link

I was wondering the same thing. Any luck yet @lukewlms ?

@lukewlms
Copy link
Author

@chevin99 no :\ have spent some hours on this - it really seems like a scenario no one supports at all unfortunately!

@chevin99
Copy link

@lukewlms dang, well thanks anyway for responding back so quick 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants