Quickly transport yourself to the right URL
Bug report
·
Feature request
Wormhole is a URL redirection service that allows you to quickly share short, memorable links with others without worrying about configuring a go-url service.
My purpose of using this along with time-to-go is to extend blogs sharing capabilities without me needing to add each and every blog to the go-url service.
So instead of going to akashrajpurohit.com/blogs/ and then search for the blog there and then sharing the full length URL, I would be able to just share the URL using this service.
Example - https://q.akashrajpurohit.com/inhouse-newsletter will redirect user to https://akashrajpurohit.com/blog/i-built-my-own-inhouse-newsletter-system/
Wormhole is a Cloudflare Worker that uses DuckDuckGo's bangs to redirect the user to the actual URL for a specific given domain.
As long as your query is in the format ! site:domain query
it will redirect you to the actual URL.
To self-host Wormhole, follow these steps:
- Account with Cloudflare. Everything required for this is available on Free plan as well.
- Node.js installed on your machine if you want to run it locally first.
- PNPM - The package manager used.
Before deploying Wormhole, make sure to set the following environment variables:
All of the tokens mentioned in this section are required.
CF_API_TOKEN
: Your Cloudflare API token. Create the API tokens from hereCF_ACCOUNT_ID
: The ID of the Cloudflare zone where you want to deploy Time to Go.
-
DOMAIN
- This would be the domain you want your search to be associated with. For example if you want to search for! site:example.com query
thenexample.com
would be the value for this variable. -
FALLBACK_URL
- This would be the full URL where you want to redirect the user if no query is provided. For example if you want to redirect the user tohttps://example.com
thenhttps://example.com
would be the value for this variable.
To deploy Time to Go, follow these steps:
- Fork this repository to your own GitHub account.
- Add the environment variables for the forked repository from the Github Actions section.
- Clone the forked repository to your local machine.
- Navigate to the repository directory.
- Install the dependencies by running the command:
pnpm install
. - Edit the
wrangler.toml
file and update the valuesDOMAIN
andFALLBACK_URL
in thevars
section. - Commit your changes and push them to your forked repository.
- GitHub Actions will automatically trigger the deployment process. Wait for the action to complete.
Congratulations! Wormhole is now deployed and ready to use.
If you encounter any problems feel free to open an issue. If you feel the project is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull requests are also welcome.