K
K
kxnkxv2020-04-28 21:29:06
Java
kxnkxv, 2020-04-28 21:29:06

How to process a request from the client to the server and how to generate the same request?

I have client, proxy and ftp server.
(So ​​far, they do not communicate with each other, they do not even connect to each other)
The client accesses the proxy server so that it connects to the ftp server, downloads the file and transfers it to the client.
From client to server protocol: SSL
From server to ftp-server protocol: SFTP
Three questions:
1. How to generate server-to-client request based on parameters: ip, port, path, filename, filetype, login, password;
2. How to teach the server to understand what he needs to do? (One of the options that I see is to write my own SFTP client)
3. How to transfer the file downloaded by the proxy server to the client?

While writing, I thought that it probably makes sense to explain that the list of tasks includes not only downloading a file through a proxy from ftp and transferring it to the client, but also uploading it to ftp through a proxy.

You can also advise libraries or code examples for working with SFTP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2020-04-28
@leahch

Here is a typical integration task, which would be good to solve by appropriate means. I suggest looking at apache camel (my choice) or mule esb. And there and there there is both sftp and everything else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question