Coder Social home page Coder Social logo

cf-doh's Introduction

cf-doh

Proxy Google DoH by cloudflare workers.

可结合 https://github.com/GangZhuo/dohclient 使用。

手动部署

  1. 注册 cloudflare 账号
  2. 打开 https://workers.cloudflare.com/ ,并登录
  3. 点击 Create a Worker 按钮
  4. https://github.com/GangZhuo/cf-doh/blob/master/dist/cf-doh-min.js 中的内容复制替换到左侧脚本编辑框中
  5. 点击 Save and Deploy 按钮
  6. 使用浏览器浏览新部署的站点,应能显示 Hello worker! 字符
  7. 如需设置到 firefox 中,请在地址后边添加 /dns-query, 形成类似 https://$yourName.$yourSubDommain.workers.dev/dns-query 这样的地址 (注意: 不是 /resolve)

Deploy by Wrangler

  1. Install Wrangler

Following Cloudflare Workers Quick Start .

  1. Generate project by below command:
wrangler generate cf-doh https://github.com/GangZhuo/cf-doh
  1. Change wrangler.toml file with your "name" and "account_id".

The name field in this config file, which will map to your script’s deploy name (e.g. cf-doh.mysubdomain.workers.dev).

The account_id field can be find in your dashboard page.

  1. Publish project by below command:
wrangler publish

Usaging

After publshed, there are two APIs:

  • https://$yourName.$yourSubDommain.workers.dev/dns-query
  • https://$yourName.$yourSubDommain.workers.dev/resolve?

See document at Google DoH .

cf-doh's People

Contributors

gangzhuo avatar

Watchers

James Cloos 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.