A tool that helps bypass network restrictions on remote servers by creating an SSH tunnel and Squid proxy.
Note: Currently only compatible with Ubuntu-based systems using the APT package manager.
This script was created by [DaTi_Co]
The script sets up a proxy server on a remote server using SSH and Docker. It allows the user to configure their browser to use the proxy server for internet access. The script performs the following steps:
- Asks the user for the remote server IP address, username, and port (optional).
- Checks if the proxy configuration file already exists on the remote server.
- If the proxy configuration file does not exist, adds the proxy configuration to the remote server's APT configuration.
- Connects to the remote server using SSH and creates a remote port forwarding.
- Checks if a Docker container with a Squid proxy server is already running.
- If the Docker container is not running, starts a Docker container with a Squid proxy server.
- Outputs the proxy server details (http://localhost:3128) for the user to configure their browser.
- Defines a cleanup function to stop the Docker container, remove the proxy config file from APT, and close the SSH connection.
- Calls the cleanup function if the user presses Ctrl+C or the script is terminated.
- Waits for the user to press Ctrl+C to stop the script.
The script requires the following dependencies to be installed on the local machine:
sshpassfor password-based SSH authenticationdockerfor running the Squid proxy- SSH access to the remote server
# Clone the repository
git clone https://github.com/DaTiC0/DaTi-Proxy.git
cd DaTi-Proxy
# Make the script executable
chmod +x connect.shRun the script and follow the interactive prompts:
./connect.shThe script will ask for:
- Remote server IP address
- Username (defaults to your current user)
- SSH port (defaults to 22)
- Password
Once the script is running, on the remote server you can use:
sudo apt update
sudo apt install <package-name>The traffic will be routed through your local machine's internet connection.
Connection issues:
- Verify SSH credentials are correct
- Ensure the remote server allows SSH connections
- Check if port 3128 is available on your local machine
APT issues:
- Verify
/etc/apt/apt.conf.d/33proxyexists on the remote server - Check if Squid proxy is running with
docker ps | grep squid-proxyon local machine
This tool is provided for educational purposes only. You are responsible for complying with all applicable laws and organizational policies when using this tool. Use at your own risk.