GithubHelp home page GithubHelp logo

redirect.name's Introduction

redirect.name's People

Contributors

davidgfnet avatar elementalvoid avatar holic avatar mjbnz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redirect.name's Issues

TXT record on a different hostname

As suggested on Hacker News, it might be wise to put the TXT records used for configuring redirects on a separate hostname, e.g. _redirect.some.hostname.com. This would prevent polluting the actual hostname and allow the use of CNAME records on subdomains (instead of A/ALIAS).

Bug/Feature: Allow multi string TXT records

I stumbled over the fact that "Redirects to URL" must be in a single string whereas "Redirects" "to" "URL" doesn't work.

As some DNS providers create multi string TXT records it would help to support both styles.

Maybe this is also a bug/behavior of net.LookupTXT and would require using it differently or using a different resolver library.

Can't get the redirect to work

Trying to work out what I got wrong with the instructions on redirect.name:

Here's how I set up my redirect in CloudFlare:

screen shot 2017-07-15 at 10 21 53

Here's a exported file from CloudFlare

;; TXT Records
_redirect.booyaa.booyaa.wtf.    300     IN      TXT     "Redirects to http://booyaa.org"

;; CNAME Records
booyaa.booyaa.wtf.      300     IN      CNAME   alias.redirect.name.

Remove www from resolve

Currently for correct redirecting on both www.example.org and example.org two _redirect TXT recods needed.

It will be cool to remove "www." from resolved TXT record.

To be backwards compatible two resolves can be done - if no _redirect.www.example.org record found - search for _redirect.example.org also.

Evaluate speed of OpenResty vs. Go

I've been looking for an excuse to dive into Go and this would be a good project to learn and evaluate the speed/performance of OpenResty vs. basic HTTP server in Go.

Improve documentation

I used a template from the GitHub Pages generator to get some basic docs up and running quickly, but they could be vastly improved.

Collect emails for service notifications

One disadvantage of not requiring sign-ups is I have no way to get in touch with the users of this service. If the IP address or TXT formatting needs to change for whatever reason, there would be no way to communicate this with users. An optional subscribe form on the docs site would be handy for keeping in touch with users.

Human-readable TXT record format

This RFC describes TXT records with the following format:

<owner> <class> <ttl> TXT "<attribute name>=<attribute value>"

This is how I decided to go with redirect.name=... for the TXT record format for this service. However, I'm seeing some services not following the RFC, specifically DNSimple's ALIAS record, which adds a TXT record with value ALIAS for alias.redirect.name.

If it's not really necessary to follow this RFC, maybe a more generic, human readable format would be ideal? Something like:

  • Redirects to https://github.com/holic
  • Redirects permanently to https://github.com/holic
  • Redirects from /github to https://github.com/holic/redirect.name
  • Redirects permanently from /* to https://github.com/holic/*

Support for POST, PUT, etc?

I'm not sure if this is beyond the goals of this project, but how about supporting redirecting other http methods?

For (a rather silly) example, if I have the following:

thing-service.mydomain.com    IN CNAME    alias.redirect.name
_redirect.things-service.mydomain.com    IN TXT    Redirect from /* to https://my-app.herokuapp.com/*

I'd like POST thing-service.mydomain.com/things to be forwarded to https://my-app.herokuapp.com/things with the same post body. Using a status code of 307 when redirecting should do the trick - I can put up a pull request, but I just first wanted to make sure it aligned with this project's goals.

Wildcard fallback?

@holic fantastic tool, thanks. The power:simplicity here is wonderful.

How do you feel about a PR to handle catch-all wildcards before the fallback function?

e.g.

             IN  ALIAS  alias.redirect.name ; domain apex using a non-standard record
_redirect    IN  TXT    "Redirects permanently to https://example.com/*"

*            IN  CNAME  alias.redirect.name
_redirect.*  IN  TXT    "Redirects permanently to https://example.com/*"

My use-case is extremely lazily redirecting miss-spelled domain names. This functionality would allow for a standard set of records to be added for each without care to past or future sub-domain changes.

Currently this would be handled by defining a _redirect TXT record for every possible subdomain.

(Also, if it's relevant, I'm self hosting via the published docker image - swift and stateless is great)

Redirect to non-HTTP protocols

Could we have redirections that are non-http(s)? I can thing of FTP but also perhaps other valid URIs schemas such as "magnet" or "e2k"?
If you agree I can send a PR myself :)

Add tests

Not really sure how to easily test the Lua code, but rewriting in Go would be a lot easier to test, assuming it's more performant.

Support for https

I love your service!
Great idea and damn simple to use.

Is there any chance that https is supported as well?
As I see there is right now no https support enabled for the sld alias.redirect.name
Maybe it could be setup by using acme v2 wildcard certs from letsencrypt?

where can I donate?

I love this service and I wouldn't mind donating (BTC or otherwise) a little to keep the servers running...

License?

Cool project, thanks for sharing it! I came across and wanted to setup locally on my server but I see the code does not have a license. Would you consider adding one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.