This repo builds v2ray docker image for heroku app and helps you deploy it.
Free heroku app is overwhelmed and hence become slower over the time, please treat it with kid gloves. Stop being a Yang Mao Dang! Consider turning to a paid proxy service if you want a better user experience.
A redirection will be made to collect the clicks statistics.
It's inspired by v2ray-heroku which has some pitfalls.
- It downloads and deflates the latest v2ray everytime the heroku app boots, incuring a large latency to respondence to the initial proxy requests (Free Heroku App will force to stop after a while of idle).
- In order to reduce the image size, it's built from Alpine Linux 3.5 which is too old to have an up-to-date ca-certificates.
- No fine tuned template v2ray client config which makes novices hard to pick it up or easy to suffer from performance issues or privacy leakage problems.
This project builds the docker image with v2ray included against latest Alpine Linux and pushs to the docker hub.
The drawback this way is that the v2ray is not always up to date, to do so you need to:
- Fork this repo.
- Connect the forked repo to your heroku app in the heroku dashboard
Deploy
tab (choose the deployment methodGitHub
). - Choose automatic deploy, tick
Wait for CI to pass before deploy
. - Enable github actions in the
actions
tab as it's disabled when forked. The repo has a workflow that runs periodically to check the new release and triggers auto deploy when found one.
There is a default one, you can generate your own UUID
at the end of the deploy if you are concern of the default one. Generate now.
Set to 'true' to enable proxy server side DoH (DNS over HTTPS) to protect your DNS queries, although it will increase a little delay to your DNS queries. 'false' to disable it.
Please find v2ray config files in the repo. config.json.server
is used by heroku app, config.json.client
is for your v2ray client, please modify it to suit your case.
- All stuffs here are open sourced, you can check them line by line.
- V2ray is downloaded from the its offical github release page.
- You can check the SHA digest of the images in the building results and the docker image digest in the docker hub (Digest changes even with the same building stuffs for different docker image buildings).
- You can further check the building steps of a docker image in the docker hub.
- If you are still not convinced, you can fork the repositary, build the image by yourself and deploy it.
addEventListener(
"fetch", event => {
let url = new URL(event.request.url);
url.hostname = "<your app name>.herokuapp.com";
let request = new Request(url, event.request);
event.respondWith(
fetch(request)
)
}
)