Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP SFTP with proxy

I'm searching for a class / extension / whatever that allows me to use a proxy for an SFTP connection in PHP.

I've checked the ssh2_ftp function and phpseclib, but I didn't find any reference to proxy settings...

Any idea?

like image 453
napolux Avatar asked Sep 15 '26 11:09

napolux


1 Answers

Would you be tunneling over SOCK4 or SOCK5 or HTTP CONNECT? Or something else?

One thing you might be able to do is modify phpseclib. eg. in the Net_SSH2 constructor, add in the code to connect to the proxy via SOCK4/5/whatever and then just let Net_SSH2 behave normally after that.

like image 189
neubert Avatar answered Sep 18 '26 01:09

neubert