Dino Geek, try to help you

How to use RSYNC with a proxy?


`RSYNC` is a versatile and reliable utility for managing file synchronization, backups, and mirroring in Unix-based operating systems such as Linux. However, it’s important to note that rsync doesn’t natively support proxy servers. But don’t worry, there are still ways to make it work.

Firstly, you can use `corkscrew`, which is an open-source tool that enables SSH to be tunneled through HTTP proxies (Blanchon, ‘corkscrew’, Github, 2020). To use it, you need to install corkscrew first. For Ubuntu-based systems, the command will be:

```
sudo apt-get install corkscrew
```

After installing corkscrew, you need to create an SSH configuration file in your home directory and specify your proxy server:

```
nano ~/.ssh/config
Host * ProxyCommand corkscrew %h %p
```
Replace `` and `` with your proxy information. Don’t forget to save the file.

After completing the above steps, you should be able to use rsync over SSH tunneled through your HTTP proxy:

```
rsync -avz -e ssh source_directory user@destination:/path/to/directory/
```

Secondly, you can use `socat`, a command-line based utility that establishes two-way byte streams and transfers data between them (Gerwinn, ‘socat’, Github, n.d.). For this approach, you would also have to install it first:

For Debian-based systems:

```
sudo apt-get install socat
```

And then you can run the socat command to establish a PROXY to local connection:

```
socat TCP-LISTEN:localport,reuseaddr,fork PROXY:proxy_ip:target_ip:target_port,proxyport=proxy_port
```

Once you understand these methods, you’ll have a better idea of how to use rsync with a proxy. However, do remember that these methods involve third-party tools and might need some tweaking based on your specific proxy setup.

Do consider the security implications and check your network’s policy before implementing these changes.

Sources:

1. Blanchon, V. (2020, March 15). ‘corkscrew’. Github. https://github.com/bryanpkc/corkscrew
2. Gerwinn, G. (n.d). ‘socat’. Github. https://github.com/dest-unreach/socat
3. Rsync man page. https://linux.die.net/man/1/rsync
4. Corkscrew man page. https://manpages.ubuntu.com/manpages/focal/man1/corkscrew.1.html
5. Socat man page. http://www.dest-unreach.org/socat/doc/socat.html


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use