This is a tunnel application made to expose your local development environment to the internet, similar to ngrok. It includes both server and client code. You can use this setup with your own server to expose your team's development applications to the internet for testing purposes.
In this repository, we include both the server and client code.
Run the server code on a publicly accessible server, such as any cloud provider's server. This server will handle incoming traffic and forward it to your local development environment.
Run the client code on your local machine. This code will establish a connection to the server and create a secure tunnel, making your local application accessible over the internet.
By using this setup, your team members can easily share their local development work with others for testing and collaboration.
To set up your own server, follow these steps:
-
Clone this repository:
git clone https://github.com/vishal5400/tunnel.git
-
Navigate to the repository directory:
cd yourrepository
-
Run the
server-setup.sh
script:./server-setup.sh
This script will automatically install all necessary dependencies and set up the server.
To check the status of the application, use the following command:
systemctl status tunnel-app.service
Clone this repository and run the client-setup.sh
script. It will automatically install all necessary dependencies and set up the server.
-
Clone the repository:
git clone https://github.com/vishal5400/tunnel.git
cd your-repo
-
Run the setup script:
./client-setup.sh
-
Add your domain and server IP in .env file:
Navigate to the
.client
directory and open the.env
file using a text editor. Add the following variables and replace the placeholders with your domain and server IP:
cd ~/.client
vim .env
Add these variables in the .env file.:
SERVER="http://your-domain.com"
SERVER_IP="your-server-ip"
- After installing the client, you can use it with the following command:
tunnel-client <local-port>