GithubHelp home page GithubHelp logo

mili-tan / arashidns.aoi Goto Github PK

View Code? Open in Web Editor NEW
78.0 3.0 6.0 573 KB

Simple DNS over HTTPS Server

Home Page: https://doh.mili.one

License: Mozilla Public License 2.0

C# 97.37% HTML 0.78% Batchfile 0.48% Dockerfile 1.34% Shell 0.03%
dns dns-over-https doh doh-json google-dns rfc-8484 doh-server hacktoberfest

arashidns.aoi's Introduction

中文简体 Readme English Readme

GitHub-action license GitHub-release Github All Releases FOSSA Status


QuickStart

Host your DNS over HTTPS Server just by running ./Arashi.Aoi --upstream 127.0.0.1.

If you get Permission denied, run chmod +x ./Arashi.Aoi to grant execution permission.

OR using Docker. docker run -d -p 2020:2020 ghcr.io/mili-tan/arashidns.aoi --upstream 8.8.8.8

It is that easy. Use --help / -? to discover more parameters and get help information.

wget https://t.mili.one/arashia-linux-x64 -O /usr/bin/arashia
wget https://t.mili.one/arashia.service -O /etc/systemd/system/[email protected]
chmod +x /usr/bin/arashia 
systemctl enable [email protected] --now

Introduction

Parameters

Parameter Explanation Example
-? / --help Show help information
-l / --listen Set the server listening address and port 127.0.0.1:2020
-u / --upstream Set the upstream origin DNS server IP address 8.8.8.8
-t / --timeout Set timeout for query to the upstream DNS server (ms) 500
-r / --retries Set number of retries for query to upstream DNS server 5
-p / --perfix Set your DNS over HTTPS server query prefix "/dns-query"
-c / --cache Local query cache settings full / flexible / none
--log Console log output settings full / dns-query / none
--tcp Set enable upstream DNS query using TCP only
--noecs Set force disable active EDNS Client Subnet
-s / --https Set enable HTTPS (Self-Signed Certificate by default, Not Recommended)
-pfx / --pfxfile Set your pfx certificate file path (with optional password) "./cert.pfx"
-pass / --pfxpass Set your pfx certificate password "passw0rd "
-pem / --pemfile Set your pem certificate file path "./cert.pem"
-key / --keyfile Set your pem certificate key file path "./cert.key"

Environment Variables

Usually you only need to set them when running in a container (such as Docker).

And generally only ARASHI_VAR and PORT need to be set.

Variables Explanation Example
PORT Set the server listening port 2020
ARASHI_ANY Set the server listening any address true
ARASHI_VAR Set start-up parameters (see above) -u 127.0.0.1 -r 3
ARASHI_RUNNING_IN_CONTAINER Manual setting is required only if the container is not identified true

Run in Background

Windows
  • Just double-click it, or run ./Arashi.Aoi.exe in Command Prompt or Powershell, and click the Minimize button.
  • Use nssm to register ArashiDNS.Aoi as a service. It as a service will restart in the unexpected failure.
Linux
  • Run nohup ./Arashi.Aoi --upstream 127.0.0.1 & or use screen. Despite being a dirty approach, it just works.
  • Use supervisor, pm2, monit, gosuv, or systemd as process daemon and keeping ArashiDNS.Aoi running.

Protocol Compatibility

Google DNS over HTTPS Json API

When the ct parameter's application is not dns-message , and with a valid name parameter. ArashiDNS.Aoi provides Google JSON API for DNS over HTTPS (DoH) compatible protocol. Parameters are the same, but cd , do , random_padding are not implemented, they will be ignored.

IETF RFC-8484 DNS over HTTPS

ArashiDNS.Aoi provides complete IETF DNS-over-HTTPS (RFC 8484) Compatibility. The GET request needs to contain valid dns parameters.

Features

IPv6 Support

Full IPv6 support is available, but in many cases IPv4 is still preferred. You may need to force AAAA lookups or ipv6 server listening addresses.

EDNS-Client-Subnet

EDNS-Client-Subnet is enabled by default. Your upstream origin DNS server also needs to support EDNS-Client-Subnet for it to work. If your server is hosted in ECS or behind CDN, The request need to include X-Forwarded-For or X-Real-IP.

If you wish to disable it, please enter EDNS-Client-Subnet IP 0.0.0.0 in your client.

Feedback

  • As a beginner, I seek your kind understanding of the issues in the project.
  • If you have bug reports or feature request, please feel free to send issues.
  • PRs of new feature implementations or bug fixes are greatly appreciated.
  • I am not a native English speaker, so please forgive my typo and grammatical errors. Communication in Chinese is preferred if possible.

Acknowledgements

ReSharper is a really amazing tool that made my development several times more efficient.

Thanks to JetBrains for providing the ReSharper open source license for this project.

Credits

ArashiDNS was born out of open source softwares and the people who support it.

Check out Credits for a list of our collaborators and other open source softwares used.

License

Copyright (c) 2020 Milkey Tan. Code released under the Mozilla Public License 2.0.

ArashiDNS™ is a trademark of Milkey Tan.

arashidns.aoi's People

Contributors

mili-tan avatar suibianp 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

Watchers

 avatar  avatar  avatar

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.