Code Monkey home page Code Monkey logo

wabble's Introduction

wabble

npm version actions codecov Lines of Code vulnerabilities

Templates

setting.yml

version: 1.0



api:
  port: 8080
  cors: false    # set true to enable Cross-Origin Resource Sharing
  shared: false  # set true to allow access from external



resolver:
  
  timeout: 80ms  # default as 80 milliseconds

  ttl:
    min: 1h  # minimum to 1 hour
    max: 1d  # maximum to 1 day

  upstream:
    - uri:   udp://1.1.1.1             # DNS
    - uri:   tls://1.1.1.1             # DNS over TLS   (DoT)
    - uri: https://1.1.1.1/dns-query   # DNS over HTTPS (DoH)



services: # local

  # http proxy
  - uri:   http://127.0.0.1:3000

  # socks5 proxy
  - uri: socks5://127.0.0.1:4000



servers: # remote, circular ordering (round-robin)

  # http
  - uri: http://example.org:3128
    timeout: 7s

  # socks5
  - uri: socks5://example.org:1080

  # shadowsocks
  - uri: ss://example.org:4200
    key: this-is-your-password
    alg: aes-128-cfb # optional, default to chacha20-ietf-poly1305

  # trojan
  - uri: trojan://example.org:443
    password: abcd123456
    ssl: # optional, each fields default as below
      verify: true
      verify_hostname: true
      sni: example.org # default to the hostname in uri on above
      alpn: [ h2, http/1.1 ]
      cipher:
        - ECDHE-ECDSA-AES256-GCM-SHA384
        - ECDHE-ECDSA-CHACHA20-POLY1305
        - ECDHE-RSA-AES256-GCM-SHA384
        - ECDHE-RSA-CHACHA20-POLY1305
        - ECDHE-ECDSA-AES256-SHA
        - ECDHE-RSA-AES256-SHA
        - DHE-RSA-AES256-SHA
        - AES256-SHA
      cipher_tls13:
        - TLS_AES_128_GCM_SHA256
        - TLS_CHACHA20_POLY1305_SHA256
        - TLS_AES_256_GCM_SHA384



rules:

  proxy:

    # plain text match
    - google

    # prefix with: BEGIN, FULL, END, REG, CIDR,
    - BEGIN,admin.
    -  FULL,www.instagram.com
    -   END,youtube.com
    -   REG,(www|mobile)\.twitter\.com$
    -  CIDR,8.8.8.0/24

  direct:

    - END,.cn
    - FULL,localhost

  reject:

    # prepend with NOT to make sure it doesn't gets dropped accidentally
    - NOT,END,.org

    - safebrowsing.urlsec.qq.com

    - doubleclick
    - google-analytics

API Endpoint

  • GET /health
  • GET /metrics
  • GET /dump
  • POST /test-domain
  • POST /flush-dns
  • POST /reload
  • POST /exit

wabble's People

Contributors

imcotton avatar

Stargazers

masx200 avatar

Watchers

 avatar James Cloos avatar

wabble's Issues

Remove depercated code in next minor release (v0.12)

TODO:

  • wabble/src/extra.ts

    Lines 7 to 8 in 250486e

    // eslint-disable-next-line deprecation/deprecation
    export { cryptoPairs } from './servers/shadowsocks.js';
  • wabble/src/utils/index.ts

    Lines 232 to 239 in 250486e

    /**
    * @deprecated use chunksOf
    */
    export function chop (max: number, chunk: Uint8Array) {
    return chunksOf (max) (chunk);
    }
  • /**
    * @deprecated use cryptoPairsC
    */
    export function cryptoPairs (server: ShadowSocks, head: Uint8Array) {

TODO: targeting to es2020 after drop node v12

Benefit by natively support:

  • BigInt 42n
  • nullish coalescing ??
  • optional chaining ?.
  • Promise.allSettled

Node.js v12.x would stay with v8 in its v7.6.303 tops.

Estimating Oct. 2021 May. 2022, where v18 inital starts.

Using subarray instead of slice

const knock = u.socks5Handshake(ipOrHost, port).slice(3);

while (true) {
const sizing = await read(2 + tagSize);
const lengthBuffer = decrypt(sizing.slice(0, 2), sizing.slice(2));
const length = lengthBuffer.readUInt16BE(0);
const data = await read(length + tagSize);
const plainText = decrypt(data.slice(0, length), data.slice(length));
yield plainText;
}

decipher = crypto.createDecipheriv(algorithm, key, chunk.slice(0, ivLength));
if (chunk.length === ivLength) {
return cb();
}
chunk = chunk.slice(ivLength);

Features to adopt in Node v16

gantt
    dateFormat  YYYY-MM-DD
    14.x : 2020-04-21, 2023-04-30
    16.x : 2021-04-20, 2023-09-11
    18.x : 2022-04-19, 2025-04-30
    20.x : 2023-04-18, 2026-04-30
todayMarker stroke-width:10px,stroke:#0f0,opacity:0.5
Loading

https://github.com/nodejs/release#release-schedule

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.