This repository contains a Go program that allows you to download the latest version of a file (gophertunnel.exe
) from a remote source and run it.
The program provides a simple interface to download the latest version and run it.
- Download Latest Version: Press
d
to download the latest version from the specified URL. - Run the File: Press
r
to run the downloaded file.
-
Clone the Repository:
git clone https://github.com/HashimTheArab/go-remote-download.git cd go-remote-download
-
Build the Program:
go build -o go-remote-download main.go
- Host Your File on GitHub:
-
Upload your exe file to your GitHub repository.
-
Go to the file in your repository on GitHub.
-
Click on the
Raw
button to get the URL for the raw file. It should look like this:https://raw.githubusercontent.com/username/repository/branch/path/to/file.exe
-
Update the Download URL in the Program:
- Open
main.go
in your preferred text editor. - Replace the
url
constant with the raw URL of your file:
const url = "https://raw.githubusercontent.com/username/repository/branch/path/to/file.exe" const name = "file.exe"
- Open
-
Build the Program:
go build -o go-remote-download main.go
-
Run the Program:
./go-remote-download
The program will prompt you to either download the latest version or run the file:
Gophertunnel Remote Downloader Press 'd' to download the latest version or 'r' to run it:
- Press
d
to download the latest version of your file. - Press
r
to run the downloaded version.
- Press
- Go 1.21 or higher
The download URL and file name are defined as constants in the program. You can modify these values as needed:
const url = "https://raw.githubusercontent.com/HashimTheArab/go-remote-download/main/gophertunnel.exe"
const name = "gophertunnel.exe"
This README was generated by ChatGPT 4o.