Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14610a7867 | ||
|
|
9044f44e10 | ||
|
|
7fe89d5aa1 | ||
|
|
6f674173a8 | ||
|
|
21e9c8d83b | ||
|
|
2c501b9fe4 | ||
|
|
e92acf8214 | ||
|
|
65fd8c7d4d | ||
|
|
e78cf2ba82 | ||
|
|
d4d796d3b1 | ||
|
|
e81d6de355 | ||
|
|
d424098fdf | ||
|
|
eca31fec3e |
109
.github/workflows/ci.yml
vendored
Normal file
109
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build in ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
env:
|
||||
NAME: updns
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
- name: Cargo clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
|
||||
- name: Cargo test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --release
|
||||
|
||||
- name: Cargo build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release
|
||||
|
||||
# -------------- Relese --------------
|
||||
|
||||
- name: Get release version (windows)
|
||||
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'windows')
|
||||
id: GITHUB_RELEASE
|
||||
shell: bash
|
||||
run: echo ::set-output name=TAG::${GITHUB_REF:10}
|
||||
|
||||
- name: Package zip (linux)
|
||||
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
cd ./target/release/
|
||||
zip ${{ env.NAME }}-${GITHUB_REF:10}-linux.zip ${{ env.NAME }}
|
||||
|
||||
- name: Package zip (osx)
|
||||
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
cd ./target/release/
|
||||
zip ${{ env.NAME }}-${GITHUB_REF:10}-osx.zip ${{ env.NAME }}
|
||||
|
||||
- name: Package zip (windows)
|
||||
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
cd ./target/release/
|
||||
Compress-Archive -CompressionLevel Optimal -Force -Path ${{ env.NAME }}.exe -DestinationPath ${{ env.NAME }}-${{ steps.GITHUB_RELEASE.outputs.TAG }}-windows.zip
|
||||
|
||||
- name: GitHub release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
files: ./target/release/*.zip
|
||||
|
||||
- name: Cargo publish
|
||||
uses: actions-rs/cargo@v1
|
||||
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')
|
||||
with:
|
||||
command: publish
|
||||
args: --token ${{ secrets.CARGO_TOKEN }} -v
|
||||
|
||||
|
||||
62
.travis.yml
62
.travis.yml
@@ -1,62 +0,0 @@
|
||||
|
||||
language: rust
|
||||
services: docker
|
||||
sudo: required
|
||||
|
||||
env:
|
||||
global:
|
||||
- CRATE_NAME=updns
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
||||
- env: TARGET=linux
|
||||
os: linux
|
||||
|
||||
- env: TARGET=osx
|
||||
os: osx
|
||||
|
||||
- env: TARGET=windows
|
||||
os: windows
|
||||
|
||||
before_install:
|
||||
- set -e
|
||||
- rustup component add rustfmt
|
||||
|
||||
script:
|
||||
- cargo fmt --all -- --check
|
||||
- cargo test --release
|
||||
- cargo build --release
|
||||
|
||||
after_script: set +e
|
||||
|
||||
before_deploy:
|
||||
- cd ./target/release/
|
||||
- test -r $CRATE_NAME && zip $CRATE_NAME-$TRAVIS_TAG-$TARGET.zip $CRATE_NAME || mv $CRATE_NAME.exe $CRATE_NAME-$TRAVIS_TAG-$TARGET.exe
|
||||
- cd ../../
|
||||
|
||||
deploy:
|
||||
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: $GITHUB_TOKEN
|
||||
file_glob: true
|
||||
file: ./target/release/$CRATE_NAME-$TRAVIS_TAG-$TARGET.*
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
|
||||
- provider: cargo
|
||||
token: $CARGO_TOKEN
|
||||
on:
|
||||
condition: $TARGET = linux
|
||||
tags: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- /^v\d+\.\d+\.\d+.*$/
|
||||
- master
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
536
Cargo.lock
generated
536
Cargo.lock
generated
@@ -2,7 +2,7 @@
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "ace"
|
||||
version = "0.0.2"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@@ -32,7 +32,7 @@ version = "0.3.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -76,12 +76,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "0.4.12"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
@@ -90,7 +86,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@@ -106,50 +102,12 @@ name = "constant_time_eq"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@@ -158,7 +116,7 @@ name = "dirs"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@@ -167,10 +125,10 @@ name = "dirs-sys"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -219,97 +177,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-executor 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel-preview"
|
||||
version = "0.3.0-alpha.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-core-preview"
|
||||
version = "0.3.0-alpha.19"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink-preview"
|
||||
version = "0.3.0-alpha.19"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.1"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-macro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -317,25 +257,12 @@ dependencies = [
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-util-preview"
|
||||
version = "0.3.0-alpha.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iovec"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -351,29 +278,18 @@ dependencies = [
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -381,22 +297,15 @@ name = "memchr"
|
||||
version = "2.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.19"
|
||||
version = "0.6.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -411,9 +320,9 @@ name = "mio-uds"
|
||||
version = "0.6.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -432,9 +341,9 @@ name = "net2"
|
||||
version = "0.2.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -443,54 +352,9 @@ version = "0.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.10.1"
|
||||
name = "pin-project-lite"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pin-project-internal 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
@@ -502,7 +366,7 @@ name = "proc-macro-hack"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -522,7 +386,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.6"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -541,7 +405,7 @@ name = "quote"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -567,7 +431,7 @@ dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -596,18 +460,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.1"
|
||||
version = "1.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.12"
|
||||
version = "0.6.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@@ -625,47 +489,11 @@ name = "rustc-demangle"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "0.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "spin"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.15.44"
|
||||
@@ -681,7 +509,7 @@ name = "syn"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -699,7 +527,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "0.3.6"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -712,173 +540,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "0.2.0-alpha.6"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-codec 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-fs 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-macros 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-net 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-timer 0.3.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-codec"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-executor"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bytes 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-fs"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-io"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pin-project 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "0.2.0-alpha.6"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-net"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-codec 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-sync"
|
||||
version = "0.2.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-timer"
|
||||
version = "0.3.0-alpha.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tracing-attributes 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
@@ -891,15 +584,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "updns"
|
||||
version = "0.1.0"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"ace 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ace 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -909,7 +603,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -941,7 +635,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[metadata]
|
||||
"checksum ace 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e021d9548a20c4e74f88b5cff290ba225565e3404afcffdc6b275395128a140"
|
||||
"checksum ace 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "77c9e271cdb57529662aa91421d9b47ec2a87b92e0f3fcdebb17a3949c65fa4a"
|
||||
"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
|
||||
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
|
||||
"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba"
|
||||
@@ -951,15 +645,11 @@ dependencies = [
|
||||
"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
|
||||
"checksum blake2b_simd 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bf775a81bb2d464e20ff170ac20316c7b08a43d11dbc72f0f82e8e8d3d6d0499"
|
||||
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||
"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
|
||||
"checksum bytes 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "42e7586d1d1a8da3546dd87ea64dae7f451ce9a0fdecd7a48893c55eb18b1c8f"
|
||||
"checksum cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7"
|
||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
|
||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||
"checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120"
|
||||
"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa"
|
||||
"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71"
|
||||
"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9"
|
||||
"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b"
|
||||
"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6"
|
||||
"checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
|
||||
"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b"
|
||||
@@ -969,42 +659,32 @@ dependencies = [
|
||||
"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||
"checksum futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f16056ecbb57525ff698bb955162d0cd03bee84e6241c27ff75c08d8ca5987"
|
||||
"checksum futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fcae98ca17d102fd8a3603727b9259fcf7fa4239b603d2142926189bc8999b86"
|
||||
"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a"
|
||||
"checksum futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866"
|
||||
"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a"
|
||||
"checksum futures-executor 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1e274736563f686a837a0568b478bdabfeaec2dca794b5649b04e2fe1627c231"
|
||||
"checksum futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e676577d229e70952ab25f3945795ba5b16d63ca794ca9d2c860e5595d20b5ff"
|
||||
"checksum futures-macro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52e7c56c15537adb4f76d0b7a76ad131cb4d2f4f32d3b0bcabcbe1c7c5e87764"
|
||||
"checksum futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "171be33efae63c2d59e6dbba34186fe0d6394fb378069a76dfd80fdcffd43c16"
|
||||
"checksum futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec"
|
||||
"checksum futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0bae52d6b29cf440e298856fec3965ee6fa71b06aa7495178615953fd669e5f9"
|
||||
"checksum futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d66274fb76985d3c62c886d1da7ac4c0903a8c9f754e8fe0f35a6a6cc39e76"
|
||||
"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d"
|
||||
"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
|
||||
"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780"
|
||||
"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8"
|
||||
"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a"
|
||||
"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba"
|
||||
"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6"
|
||||
"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
|
||||
"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6"
|
||||
"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27"
|
||||
"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5"
|
||||
"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
|
||||
"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc"
|
||||
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
|
||||
"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
|
||||
"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23"
|
||||
"checksum mio 0.6.20 (registry+https://github.com/rust-lang/crates.io-index)" = "72f4261ee7ab03cd36dc99eea4db8be6e83e4164da470e0c84f6726d6c605855"
|
||||
"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125"
|
||||
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
|
||||
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
||||
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||
"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273"
|
||||
"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
|
||||
"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
|
||||
"checksum pin-project 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c5fce7042b4e4338a3f868e563fff394709c3ff62cf6908d407dd9e2caff96ed"
|
||||
"checksum pin-project-internal 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7644b4721cc27235f667e735da8732f5b781c442157315674c0cb7f28b4cabf3"
|
||||
"checksum pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0af6cbca0e6e3ce8692ee19fb8d734b641899e07b68eb73e9bbbd32f1703991"
|
||||
"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
|
||||
"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
|
||||
"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
|
||||
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
|
||||
"checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
|
||||
"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
|
||||
@@ -1013,38 +693,22 @@ dependencies = [
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
|
||||
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
|
||||
"checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d"
|
||||
"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
|
||||
"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
|
||||
"checksum regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3"
|
||||
"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
|
||||
"checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf"
|
||||
"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
||||
"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
||||
"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
|
||||
"checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92"
|
||||
"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f"
|
||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||
"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
|
||||
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
|
||||
"checksum tokio 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1f17f5d6ab0f35c1506678b28fb1798bdf74fcb737e9843c7b17b73e426eba38"
|
||||
"checksum tokio-codec 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9f5d22fd1e84bd4045d28813491cb7d7caae34d45c80517c2213f09a85e8787a"
|
||||
"checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8"
|
||||
"checksum tokio-fs 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bf85e16971e06e680c622e0c1b455be94b086275c5ddcd6d4a83a2bfbb83cda"
|
||||
"checksum tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "112784d5543df30660b04a72ca423bfbd90e8bb32f94dcf610f15401218b22c5"
|
||||
"checksum tokio-macros 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "86b616374bcdadd95974e1f0dfca07dc913f1163c53840c0d664aca35114964e"
|
||||
"checksum tokio-net 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a441682cd32f3559383112c4a7f372f5c9fa1950c5cf8c8dd05274a2ce8c2654"
|
||||
"checksum tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2"
|
||||
"checksum tokio-timer 0.3.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b97c1587fe71018eb245a4a9daa13a5a3b681bbc1f7fdadfe24720e141472c13"
|
||||
"checksum tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ff4e4f59e752cb3beb5b61c6d5e11191c7946231ba84faec2902c9efdd8691c5"
|
||||
"checksum tracing-attributes 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a4263b12c3d3c403274493eb805966093b53214124796552d674ca1dd5d27c2b"
|
||||
"checksum tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bc913647c520c959b6d21e35ed8fa6984971deca9f0a2fcb8c51207e0c56af1d"
|
||||
"checksum tokio 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5a0dd887e37d37390c13ff8ac830f992307fe30a1fff0ab8427af67211ba28"
|
||||
"checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
11
Cargo.toml
11
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "updns"
|
||||
version = "0.1.0"
|
||||
version = "0.1.3"
|
||||
edition = "2018"
|
||||
|
||||
authors = ["wyhaya <wyhaya@gmail.com>"]
|
||||
@@ -18,10 +18,11 @@ keywords = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
ace = "0.0.2"
|
||||
ace = "0.2.0"
|
||||
dirs = "2.0.2"
|
||||
futures = "0.3.1"
|
||||
futures = "0.3.4"
|
||||
lazy_static = "1.4.0"
|
||||
regex = "1.3.1"
|
||||
log = { version = "0.4.8", features = ["max_level_trace", "release_max_level_info"] }
|
||||
regex = "1.3.6"
|
||||
time = "0.1.42"
|
||||
tokio = "0.2.0-alpha.6"
|
||||
tokio = { version = "0.2.16", features = ["fs", "io-util", "macros", "net", "stream", "time", "sync"] }
|
||||
|
||||
40
README.md
40
README.md
@@ -1,14 +1,13 @@
|
||||
|
||||
|
||||
# updns
|
||||
|
||||
[](https://travis-ci.org/wyhaya/updns)
|
||||
[](https://github.com/wyhaya/updns/actions)
|
||||
[](https://crates.io/crates/updns)
|
||||
[](https://github.com/wyhaya/updns/blob/master/LICENSE)
|
||||
|
||||
---
|
||||
|
||||
updns is a simple DNS proxy server developed using `Rust`. You can intercept any domain name and return the ip you need.
|
||||
updns is a simple DNS proxy server developed using `Rust`. You can intercept any domain name and return the ip you need
|
||||
|
||||
## Install
|
||||
|
||||
@@ -20,7 +19,7 @@ Or use `cargo` to install
|
||||
cargo install updns
|
||||
```
|
||||
|
||||
## Start to use
|
||||
## Start to use 🚀
|
||||
|
||||
```bash
|
||||
updns
|
||||
@@ -28,9 +27,7 @@ updns
|
||||
updns -c /your/hosts
|
||||
```
|
||||
|
||||
You may use `sudo` to run this command because you will use the `53` port, make sure you have sufficient permissions.
|
||||
|
||||
Now change your local DNS server to `127.0.0.1` 🚀
|
||||
You may use `sudo` to run this command because you will use the `53` port
|
||||
|
||||
## Running in docker
|
||||
|
||||
@@ -53,43 +50,42 @@ Usage:
|
||||
Command:
|
||||
add Add a DNS record
|
||||
ls Print all configured DNS records
|
||||
config Call vim to edit the configuration file
|
||||
config Call 'vim' to edit the configuration file
|
||||
path Print related directories
|
||||
help Print help information
|
||||
version Print version information
|
||||
|
||||
Option:
|
||||
-c Specify a config file
|
||||
-w Check the interval of the configuration file
|
||||
-i Check the interval time of the configuration file
|
||||
format: 1ms, 1s, 1m, 1h, 1d
|
||||
```
|
||||
|
||||
## Config
|
||||
|
||||
You can use `updns config` command and then call `vim` quick edit, or use `updns path` find the updns's installation directory and edit the `config` file
|
||||
You can use `updns config` command and then call `vim` edit, or find `~/.updns/config` edit
|
||||
|
||||
You can specify standard domains, or utilize [regular expressions](https://rustexp.lpil.uk "rustexp") for dynamic matching,
|
||||
You can update the config file at any time, updns will listen for file changes
|
||||
You can specify standard domains, or utilize [regular expressions](https://rustexp.lpil.uk "rustexp") for dynamic matching
|
||||
|
||||
> Regular expression starts with `~`
|
||||
|
||||
```ini
|
||||
bind 0.0.0.0:53 # Binding address
|
||||
proxy 8.8.8.8:53 # Proxy address
|
||||
timeout 2000 # Proxy timeout (ms)
|
||||
bind 0.0.0.0:53 # Binding address
|
||||
proxy 8.8.8.8:53 # Proxy address
|
||||
timeout 2s # Proxy timeout (format: 1ms, 1s, 1m, 1h, 1d)
|
||||
|
||||
# Domain matching
|
||||
example.com 1.1.1.1
|
||||
*.example.com 2.2.2.2
|
||||
^\w+\.example\.[a-z]+$ 3.3.3.3
|
||||
example.com 1.1.1.1
|
||||
*.example.com 2.2.2.2
|
||||
~^\w+\.example\.[a-z]+$ 3.3.3.3
|
||||
|
||||
# IPv6
|
||||
test.com ::
|
||||
|
||||
# Import from other file
|
||||
import /other/hosts
|
||||
```
|
||||
|
||||
## Todo
|
||||
|
||||
* Dynamically update port bindings
|
||||
|
||||
## Reference
|
||||
|
||||
[Building a DNS server in Rust](https://github.com/EmilHernvall/dnsguide)
|
||||
|
||||
165
src/config.rs
165
src/config.rs
@@ -1,4 +1,7 @@
|
||||
use crate::matcher::Matcher;
|
||||
use futures::future::{BoxFuture, FutureExt};
|
||||
use lazy_static::lazy_static;
|
||||
use log::error;
|
||||
use regex::Regex;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
@@ -6,6 +9,7 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
result,
|
||||
slice::Iter,
|
||||
time::Duration,
|
||||
};
|
||||
use tokio::{
|
||||
fs,
|
||||
@@ -17,6 +21,37 @@ lazy_static! {
|
||||
static ref COMMENT_REGEX: Regex = Regex::new("#.*$").unwrap();
|
||||
}
|
||||
|
||||
// Parse time format into Duration
|
||||
pub fn try_parse_duration(text: &str) -> result::Result<Duration, ()> {
|
||||
let numbers = "0123456789.".chars().collect::<Vec<char>>();
|
||||
let i = text
|
||||
.chars()
|
||||
.position(|ch| !numbers.contains(&ch))
|
||||
.ok_or_else(|| ())?;
|
||||
|
||||
let time = &text[..i];
|
||||
let unit = &text[i..];
|
||||
|
||||
if time.is_empty() {
|
||||
return Err(());
|
||||
}
|
||||
let n = time.parse::<f64>().map_err(|_| ())?;
|
||||
let ms = match unit {
|
||||
"d" => Ok(24_f64 * 60_f64 * 60_f64 * 1000_f64 * n),
|
||||
"h" => Ok(60_f64 * 60_f64 * 1000_f64 * n),
|
||||
"m" => Ok(60_f64 * 1000_f64 * n),
|
||||
"s" => Ok(1000_f64 * n),
|
||||
"ms" => Ok(n),
|
||||
_ => Err(()),
|
||||
}? as u64;
|
||||
|
||||
if ms == 0 {
|
||||
Err(())
|
||||
} else {
|
||||
Ok(Duration::from_millis(ms))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Invalid {
|
||||
pub line: usize,
|
||||
@@ -24,6 +59,23 @@ pub struct Invalid {
|
||||
pub kind: InvalidType,
|
||||
}
|
||||
|
||||
pub trait MultipleInvalid {
|
||||
fn print(&self);
|
||||
}
|
||||
|
||||
impl MultipleInvalid for Vec<Invalid> {
|
||||
fn print(&self) {
|
||||
for invalid in self {
|
||||
error!(
|
||||
"[line:{}] {} `{}`",
|
||||
invalid.line,
|
||||
invalid.kind.description(),
|
||||
invalid.source
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum InvalidType {
|
||||
Regex,
|
||||
@@ -34,7 +86,7 @@ pub enum InvalidType {
|
||||
}
|
||||
|
||||
impl InvalidType {
|
||||
pub fn as_str(&self) -> &str {
|
||||
pub fn description(&self) -> &str {
|
||||
match self {
|
||||
InvalidType::SocketAddr => "Cannot parse socket address",
|
||||
InvalidType::IpAddr => "Cannot parse ip address",
|
||||
@@ -47,7 +99,7 @@ impl InvalidType {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Hosts {
|
||||
record: Vec<(Host, IpAddr)>,
|
||||
record: Vec<(Matcher, IpAddr)>,
|
||||
}
|
||||
|
||||
impl Hosts {
|
||||
@@ -55,7 +107,7 @@ impl Hosts {
|
||||
Hosts { record: Vec::new() }
|
||||
}
|
||||
|
||||
fn push(&mut self, record: (Host, IpAddr)) {
|
||||
fn push(&mut self, record: (Matcher, IpAddr)) {
|
||||
self.record.push(record);
|
||||
}
|
||||
|
||||
@@ -65,7 +117,7 @@ impl Hosts {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iter(&mut self) -> Iter<(Host, IpAddr)> {
|
||||
pub fn iter(&mut self) -> Iter<(Matcher, IpAddr)> {
|
||||
self.record.iter()
|
||||
}
|
||||
|
||||
@@ -79,64 +131,12 @@ impl Hosts {
|
||||
}
|
||||
}
|
||||
|
||||
// domain match
|
||||
#[derive(Debug)]
|
||||
pub struct Host(MatchMode);
|
||||
|
||||
#[derive(Debug)]
|
||||
enum MatchMode {
|
||||
Text(String),
|
||||
Regex(Regex),
|
||||
}
|
||||
|
||||
impl Host {
|
||||
fn new(domain: &str) -> result::Result<Host, regex::Error> {
|
||||
// example.com
|
||||
if Self::is_text(domain) {
|
||||
return Ok(Host(MatchMode::Text(domain.to_string())));
|
||||
}
|
||||
|
||||
// *.example.com
|
||||
if Self::is_wildcard(domain) {
|
||||
let s = format!("^{}$", domain.replace(".", r"\.").replace("*", r"[^.]+"));
|
||||
return Ok(Host(MatchMode::Regex(Regex::new(&s)?)));
|
||||
}
|
||||
|
||||
// use regex
|
||||
Ok(Host(MatchMode::Regex(Regex::new(domain)?)))
|
||||
}
|
||||
|
||||
fn is_text(domain: &str) -> bool {
|
||||
const ALLOW: &str = "abcdefghijklmnopqrstuvwxyz0123456789-.";
|
||||
domain.chars().all(|item| ALLOW.chars().any(|c| item == c))
|
||||
}
|
||||
|
||||
fn is_wildcard(domain: &str) -> bool {
|
||||
const ALLOW: &str = "abcdefghijklmnopqrstuvwxyz0123456789-.*";
|
||||
domain.chars().all(|item| ALLOW.chars().any(|c| item == c))
|
||||
}
|
||||
|
||||
pub fn is_match(&self, domain: &str) -> bool {
|
||||
match &self.0 {
|
||||
MatchMode::Text(text) => text == domain,
|
||||
MatchMode::Regex(reg) => reg.is_match(domain),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
match &self.0 {
|
||||
MatchMode::Text(text) => text,
|
||||
MatchMode::Regex(reg) => reg.as_str(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub bind: Vec<SocketAddr>,
|
||||
pub proxy: Vec<SocketAddr>,
|
||||
pub hosts: Hosts,
|
||||
pub timeout: Option<u64>,
|
||||
pub timeout: Option<Duration>,
|
||||
pub invalid: Vec<Invalid>,
|
||||
}
|
||||
|
||||
@@ -218,19 +218,18 @@ impl Parser {
|
||||
}
|
||||
|
||||
// match host
|
||||
// example.com 0.0.0.0
|
||||
// 0.0.0.0 example.com
|
||||
fn record(left: &str, right: &str) -> result::Result<(Host, IpAddr), InvalidType> {
|
||||
// example.com 0.0.0.0 or 0.0.0.0 example.com
|
||||
fn record(left: &str, right: &str) -> result::Result<(Matcher, IpAddr), InvalidType> {
|
||||
// ip domain
|
||||
if let Ok(ip) = right.parse() {
|
||||
return Host::new(left)
|
||||
return Matcher::new(left)
|
||||
.map(|host| (host, ip))
|
||||
.map_err(|_| InvalidType::Regex);
|
||||
}
|
||||
|
||||
// domain ip
|
||||
if let Ok(ip) = left.parse() {
|
||||
return Host::new(right)
|
||||
return Matcher::new(right)
|
||||
.map(|host| (host, ip))
|
||||
.map_err(|_| InvalidType::Regex);
|
||||
}
|
||||
@@ -279,12 +278,12 @@ impl Parser {
|
||||
Ok(addr) => config.proxy.push(addr),
|
||||
Err(_) => invalid!(InvalidType::SocketAddr),
|
||||
},
|
||||
"timeout" => match value.parse::<u64>() {
|
||||
"timeout" => match try_parse_duration(value) {
|
||||
Ok(timeout) => config.timeout = Some(timeout),
|
||||
Err(_) => invalid!(InvalidType::Timeout),
|
||||
},
|
||||
"import" => {
|
||||
let mut path = Path::new(value).to_path_buf();
|
||||
let mut path = PathBuf::from(value);
|
||||
if path.is_relative() {
|
||||
if let Some(parent) = self.path.parent() {
|
||||
path = parent.join(path);
|
||||
@@ -301,42 +300,6 @@ impl Parser {
|
||||
|
||||
Ok(config)
|
||||
}
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_host {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_create() {}
|
||||
|
||||
#[test]
|
||||
fn test_text() {
|
||||
let host = Host::new("example.com").unwrap();
|
||||
assert!(host.is_match("example.com"));
|
||||
assert!(!host.is_match("-example.com"));
|
||||
assert!(!host.is_match("example.com.cn"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_wildcard() {
|
||||
let host = Host::new("*.example.com").unwrap();
|
||||
assert!(host.is_match("test.example.com"));
|
||||
assert!(!host.is_match("test.example.test"));
|
||||
assert!(!host.is_match("test.test.com"));
|
||||
|
||||
let host = Host::new("*.example.*").unwrap();
|
||||
assert!(host.is_match("test.example.test"));
|
||||
assert!(!host.is_match("example.com"));
|
||||
assert!(!host.is_match("test.test.test"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_regex() {
|
||||
let host = Host::new("^example.com$").unwrap();
|
||||
assert!(host.is_match("example.com"));
|
||||
assert!(!host.is_match("test.example.com"));
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
26
src/logger.rs
Normal file
26
src/logger.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use log::{LevelFilter, Metadata, Record, SetLoggerError};
|
||||
|
||||
static LOGGER: Logger = Logger;
|
||||
|
||||
pub fn init() -> Result<(), SetLoggerError> {
|
||||
log::set_logger(&LOGGER).map(|()| log::set_max_level(LevelFilter::Trace))
|
||||
}
|
||||
|
||||
struct Logger;
|
||||
|
||||
impl log::Log for Logger {
|
||||
fn enabled(&self, _: &Metadata) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn log(&self, record: &Record) {
|
||||
println!(
|
||||
"[{}] {:<5} {}",
|
||||
time::now().strftime("%F %T").unwrap(),
|
||||
record.level(),
|
||||
record.args()
|
||||
);
|
||||
}
|
||||
|
||||
fn flush(&self) {}
|
||||
}
|
||||
168
src/main.rs
168
src/main.rs
@@ -1,14 +1,16 @@
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
mod config;
|
||||
mod lib;
|
||||
mod logger;
|
||||
mod matcher;
|
||||
mod watch;
|
||||
|
||||
use ace::App;
|
||||
use config::{Config, Hosts, Invalid, Parser};
|
||||
use config::{Config, Hosts, MultipleInvalid, Parser};
|
||||
use dirs;
|
||||
use futures::prelude::*;
|
||||
use lazy_static::lazy_static;
|
||||
use lib::*;
|
||||
use log::{error, info, warn};
|
||||
use regex::Regex;
|
||||
use std::{
|
||||
env,
|
||||
@@ -20,8 +22,8 @@ use std::{
|
||||
use tokio::{
|
||||
io::{Error, ErrorKind, Result},
|
||||
net::UdpSocket,
|
||||
prelude::*,
|
||||
timer::Timeout,
|
||||
sync::RwLock,
|
||||
time::timeout,
|
||||
};
|
||||
use watch::Watch;
|
||||
|
||||
@@ -29,13 +31,15 @@ const CONFIG_FILE: [&str; 2] = [".updns", "config"];
|
||||
|
||||
const DEFAULT_BIND: &str = "0.0.0.0:53";
|
||||
const DEFAULT_PROXY: [&str; 2] = ["8.8.8.8:53", "1.1.1.1:53"];
|
||||
const DEFAULT_TIMEOUT: u64 = 2000;
|
||||
const DEFAULT_TIMEOUT: Duration = Duration::from_millis(2000);
|
||||
|
||||
const WATCH_INTERVAL: u64 = 5000;
|
||||
const WATCH_INTERVAL: Duration = Duration::from_millis(5000);
|
||||
|
||||
static mut PROXY: Vec<SocketAddr> = Vec::new();
|
||||
static mut HOSTS: Option<Hosts> = None;
|
||||
static mut TIMEOUT: u64 = DEFAULT_TIMEOUT;
|
||||
lazy_static! {
|
||||
static ref PROXY: RwLock<Vec<SocketAddr>> = RwLock::new(Vec::new());
|
||||
static ref HOSTS: RwLock<Hosts> = RwLock::new(Hosts::new());
|
||||
static ref TIMEOUT: RwLock<Duration> = RwLock::new(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
macro_rules! exit {
|
||||
($($arg:tt)*) => {
|
||||
@@ -45,28 +49,14 @@ macro_rules! exit {
|
||||
}
|
||||
};
|
||||
}
|
||||
macro_rules! error {
|
||||
($($arg:tt)*) => {
|
||||
eprint!("{} ERROR ", time::now().strftime("[%Y-%m-%d %H:%M:%S]").unwrap());
|
||||
eprintln!($($arg)*);
|
||||
};
|
||||
}
|
||||
macro_rules! info {
|
||||
($($arg:tt)*) => {
|
||||
print!("{} INFO ", time::now().strftime("[%Y-%m-%d %H:%M:%S]").unwrap());
|
||||
println!($($arg)*);
|
||||
};
|
||||
}
|
||||
macro_rules! warn {
|
||||
($($arg:tt)*) => {
|
||||
print!("{} WARN ", time::now().strftime("[%Y-%m-%d %H:%M:%S]").unwrap());
|
||||
println!($($arg)*);
|
||||
};
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let app = App::new(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"))
|
||||
logger::init().unwrap_or_else(|err| exit!("Log init failed:\n{:#?}", err));
|
||||
|
||||
let app = App::new()
|
||||
.name(env!("CARGO_PKG_NAME"))
|
||||
.version(env!("CARGO_PKG_VERSION"))
|
||||
.cmd("add", "Add a DNS record")
|
||||
.cmd("ls", "Print all configured DNS records")
|
||||
.cmd("config", "Call 'vim' to edit the configuration file")
|
||||
@@ -74,12 +64,18 @@ async fn main() {
|
||||
.cmd("help", "Print help information")
|
||||
.cmd("version", "Print version information")
|
||||
.opt("-c", "Specify a config file")
|
||||
.opt("-w", "Check the interval of the configuration file (ms)");
|
||||
.opt(
|
||||
"-i",
|
||||
vec![
|
||||
"Check the interval time of the configuration file",
|
||||
"format: 1ms, 1s, 1m, 1h, 1d",
|
||||
],
|
||||
);
|
||||
|
||||
let config_path = match app.value("-c") {
|
||||
Some(values) => {
|
||||
if values.is_empty() {
|
||||
exit!("'-c' value: [CONFIG]");
|
||||
exit!("'-c' missing a value: [FILE]");
|
||||
}
|
||||
PathBuf::from(values[0])
|
||||
}
|
||||
@@ -90,17 +86,20 @@ async fn main() {
|
||||
};
|
||||
|
||||
// Check profile interval
|
||||
let watch_interval = match app.value("-w") {
|
||||
Some(values) => {
|
||||
let watch_interval = app
|
||||
.value("-i")
|
||||
.map(|values| {
|
||||
if values.is_empty() {
|
||||
exit!("'-w' value: [ms]");
|
||||
exit!("'-i' missing a value: : [1ms, 1s, 1m, 1h, 1d]");
|
||||
}
|
||||
values[0]
|
||||
.parse::<u64>()
|
||||
.unwrap_or_else(|_| exit!("Cannot resolve '{}' to number", &values[0]))
|
||||
}
|
||||
None => WATCH_INTERVAL,
|
||||
};
|
||||
config::try_parse_duration(values[0]).unwrap_or_else(|_| {
|
||||
exit!(
|
||||
"Cannot resolve '{}' to interval time, format: 1ms, 1s, 1m, 1h, 1d",
|
||||
&values[0]
|
||||
)
|
||||
})
|
||||
})
|
||||
.unwrap_or(WATCH_INTERVAL);
|
||||
|
||||
if let Some(cmd) = app.command() {
|
||||
match cmd.as_str() {
|
||||
@@ -131,16 +130,16 @@ async fn main() {
|
||||
}
|
||||
}
|
||||
"ls" => {
|
||||
let mut config = config_parse(&config_path).await;
|
||||
let mut config = force_get_config(&config_path).await;
|
||||
|
||||
let n = config
|
||||
.hosts
|
||||
.iter()
|
||||
.map(|(r, _)| r.as_str().len())
|
||||
.map(|(m, _)| m.to_string().len())
|
||||
.fold(0, |a, b| a.max(b));
|
||||
|
||||
for (host, ip) in config.hosts.iter() {
|
||||
println!("{:domain$} {}", host.as_str(), ip, domain = n);
|
||||
println!("{:domain$} {}", host.to_string(), ip, domain = n);
|
||||
}
|
||||
}
|
||||
"config" => {
|
||||
@@ -150,7 +149,7 @@ async fn main() {
|
||||
.unwrap_or_else(|err| exit!("Call 'vim' command failed\n{:?}", err));
|
||||
|
||||
if status.success() {
|
||||
config_parse(&config_path).await;
|
||||
force_get_config(&config_path).await;
|
||||
} else {
|
||||
println!("'vim' exits with a non-zero status code: {:?}", status);
|
||||
}
|
||||
@@ -165,14 +164,14 @@ async fn main() {
|
||||
config_path.display()
|
||||
);
|
||||
}
|
||||
"help" => app.help(),
|
||||
"version" => app.version(),
|
||||
_ => app.error_try("help"),
|
||||
"help" => app.print_help(),
|
||||
"version" => app.print_version(),
|
||||
_ => app.print_error_try("help"),
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let mut config = config_parse(&config_path).await;
|
||||
let mut config = force_get_config(&config_path).await;
|
||||
if config.bind.is_empty() {
|
||||
warn!("Will bind the default address '{}'", DEFAULT_BIND);
|
||||
config.bind.push(DEFAULT_BIND.parse().unwrap());
|
||||
@@ -184,7 +183,7 @@ async fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
update_config(config.proxy, config.hosts, config.timeout);
|
||||
update_config(config.proxy, config.hosts, config.timeout).await;
|
||||
|
||||
// Run server
|
||||
for addr in config.bind {
|
||||
@@ -194,21 +193,29 @@ async fn main() {
|
||||
watch_config(config_path, watch_interval).await;
|
||||
}
|
||||
|
||||
fn update_config(mut proxy: Vec<SocketAddr>, hosts: Hosts, timeout: Option<u64>) {
|
||||
async fn update_config(mut proxy: Vec<SocketAddr>, hosts: Hosts, timeout: Option<Duration>) {
|
||||
if proxy.is_empty() {
|
||||
proxy = DEFAULT_PROXY
|
||||
.iter()
|
||||
.map(|p| p.parse().unwrap())
|
||||
.collect::<Vec<SocketAddr>>();
|
||||
}
|
||||
unsafe {
|
||||
PROXY = proxy;
|
||||
HOSTS = Some(hosts);
|
||||
TIMEOUT = timeout.unwrap_or(DEFAULT_TIMEOUT);
|
||||
};
|
||||
|
||||
{
|
||||
let mut w = PROXY.write().await;
|
||||
*w = proxy;
|
||||
}
|
||||
{
|
||||
let mut w = HOSTS.write().await;
|
||||
*w = hosts;
|
||||
}
|
||||
{
|
||||
let mut w = TIMEOUT.write().await;
|
||||
*w = timeout.unwrap_or(DEFAULT_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
async fn config_parse(file: &PathBuf) -> Config {
|
||||
async fn force_get_config(file: &PathBuf) -> Config {
|
||||
let parser = Parser::new(file)
|
||||
.await
|
||||
.unwrap_or_else(|err| exit!("Failed to read config file {:?}\n{:?}", file, err));
|
||||
@@ -218,30 +225,19 @@ async fn config_parse(file: &PathBuf) -> Config {
|
||||
.await
|
||||
.unwrap_or_else(|err| exit!("Parsing config file failed\n{:?}", err));
|
||||
|
||||
output_invalid(&config.invalid);
|
||||
config.invalid.print();
|
||||
config
|
||||
}
|
||||
|
||||
fn output_invalid(errors: &[Invalid]) {
|
||||
for invalid in errors {
|
||||
error!(
|
||||
"[line:{}] {} `{}`",
|
||||
invalid.line,
|
||||
invalid.kind.as_str(),
|
||||
invalid.source
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async fn watch_config(p: PathBuf, t: u64) {
|
||||
async fn watch_config(p: PathBuf, t: Duration) {
|
||||
let mut watch = Watch::new(&p, t).await;
|
||||
|
||||
while let Some(_) = watch.next().await {
|
||||
info!("Reload the configuration file: {:?}", &p);
|
||||
if let Ok(parser) = Parser::new(&p).await {
|
||||
if let Ok(config) = parser.parse().await {
|
||||
update_config(config.proxy, config.hosts, config.timeout);
|
||||
output_invalid(&config.invalid);
|
||||
update_config(config.proxy, config.hosts, config.timeout).await;
|
||||
config.invalid.print();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -282,20 +278,18 @@ async fn run_server(addr: SocketAddr) {
|
||||
}
|
||||
|
||||
async fn proxy(buf: &[u8]) -> Result<Vec<u8>> {
|
||||
let proxy = unsafe { &PROXY };
|
||||
let proxy = PROXY.read().await;
|
||||
let duration = *TIMEOUT.read().await;
|
||||
|
||||
for addr in proxy.iter() {
|
||||
let mut socket = UdpSocket::bind(("0.0.0.0", 0)).await?;
|
||||
|
||||
let data: Result<Vec<u8>> = Timeout::new(
|
||||
async {
|
||||
socket.send_to(&buf, addr).await?;
|
||||
let mut res = [0; 512];
|
||||
let len = socket.recv(&mut res).await?;
|
||||
Ok(res[..len].to_vec())
|
||||
},
|
||||
Duration::from_millis(unsafe { TIMEOUT }),
|
||||
)
|
||||
let data: Result<Vec<u8>> = timeout(duration, async {
|
||||
socket.send_to(&buf, addr).await?;
|
||||
let mut res = [0; 512];
|
||||
let len = socket.recv(&mut res).await?;
|
||||
Ok(res[..len].to_vec())
|
||||
})
|
||||
.await?;
|
||||
|
||||
match data {
|
||||
@@ -314,9 +308,8 @@ async fn proxy(buf: &[u8]) -> Result<Vec<u8>> {
|
||||
))
|
||||
}
|
||||
|
||||
fn get_answer(domain: &str, query: QueryType) -> Option<DnsRecord> {
|
||||
let hosts = unsafe { HOSTS.as_ref().unwrap() };
|
||||
if let Some(ip) = hosts.get(domain) {
|
||||
async fn get_answer(domain: &str, query: QueryType) -> Option<DnsRecord> {
|
||||
if let Some(ip) = HOSTS.read().await.get(domain) {
|
||||
match query {
|
||||
QueryType::A => {
|
||||
if let IpAddr::V4(addr) = ip {
|
||||
@@ -353,7 +346,7 @@ async fn handle(mut req: BytePacketBuffer, len: usize) -> Result<Vec<u8>> {
|
||||
info!("{} {:?}", query.name, query.qtype);
|
||||
|
||||
// Whether to proxy
|
||||
let answer = match get_answer(&query.name, query.qtype) {
|
||||
let answer = match get_answer(&query.name, query.qtype).await {
|
||||
Some(record) => record,
|
||||
None => return proxy(&req.buf[..len]).await,
|
||||
};
|
||||
@@ -365,7 +358,6 @@ async fn handle(mut req: BytePacketBuffer, len: usize) -> Result<Vec<u8>> {
|
||||
let mut res_buffer = BytePacketBuffer::new();
|
||||
request.write(&mut res_buffer)?;
|
||||
|
||||
let len = res_buffer.pos();
|
||||
let data = res_buffer.get_range(0, len)?;
|
||||
let data = res_buffer.get_range(0, res_buffer.pos())?;
|
||||
Ok(data.to_vec())
|
||||
}
|
||||
|
||||
184
src/matcher.rs
Normal file
184
src/matcher.rs
Normal file
@@ -0,0 +1,184 @@
|
||||
use regex::{Error, Regex};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Matcher(MatchMode);
|
||||
|
||||
#[derive(Debug)]
|
||||
enum MatchMode {
|
||||
Static(String),
|
||||
Wildcard(WildcardMatch),
|
||||
Regex(Regex),
|
||||
}
|
||||
|
||||
const REGEX_WORD: char = '~';
|
||||
const WILDCARD: char = '*';
|
||||
|
||||
impl Matcher {
|
||||
pub fn new(raw: &str) -> Result<Self, Error> {
|
||||
// Use regex: ~^example\.com$
|
||||
if raw.starts_with(REGEX_WORD) {
|
||||
let reg = raw.replacen(REGEX_WORD, "", 1);
|
||||
let mode = MatchMode::Regex(Regex::new(®)?);
|
||||
return Ok(Matcher(mode));
|
||||
}
|
||||
|
||||
// Use wildcard match: *.example.com
|
||||
let find = raw.chars().any(|c| c == WILDCARD);
|
||||
if find {
|
||||
let mode = MatchMode::Wildcard(WildcardMatch::new(raw));
|
||||
return Ok(Matcher(mode));
|
||||
}
|
||||
|
||||
// Plain Text: example.com
|
||||
Ok(Matcher(MatchMode::Static(raw.to_string())))
|
||||
}
|
||||
|
||||
pub fn is_match(&self, domain: &str) -> bool {
|
||||
match &self.0 {
|
||||
MatchMode::Static(raw) => raw == domain,
|
||||
MatchMode::Wildcard(raw) => raw.is_match(domain),
|
||||
MatchMode::Regex(raw) => raw.is_match(domain),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct WildcardMatch {
|
||||
chars: Vec<char>,
|
||||
}
|
||||
|
||||
impl WildcardMatch {
|
||||
fn new(raw: &str) -> Self {
|
||||
let mut chars = Vec::with_capacity(raw.len());
|
||||
for c in raw.chars() {
|
||||
chars.push(c);
|
||||
}
|
||||
Self { chars }
|
||||
}
|
||||
|
||||
fn is_match(&self, text: &str) -> bool {
|
||||
let mut chars = text.chars();
|
||||
let mut dot = false;
|
||||
|
||||
for cur in &self.chars {
|
||||
match cur {
|
||||
'*' => {
|
||||
match chars.next() {
|
||||
Some(c) => {
|
||||
if c == '.' {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
None => return false,
|
||||
}
|
||||
while let Some(n) = chars.next() {
|
||||
if n == '.' {
|
||||
dot = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
word => {
|
||||
if dot {
|
||||
if word == &'.' {
|
||||
dot = false;
|
||||
continue;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
match chars.next() {
|
||||
Some(c) => {
|
||||
if word != &c {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
None => return false,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if dot {
|
||||
return false;
|
||||
}
|
||||
chars.next().is_none()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Matcher {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match &self.0 {
|
||||
MatchMode::Static(raw) => write!(f, "{}", raw),
|
||||
MatchMode::Wildcard(raw) => {
|
||||
let mut s = String::new();
|
||||
for ch in raw.chars.clone() {
|
||||
s.push(ch);
|
||||
}
|
||||
write!(f, "{}", s)
|
||||
}
|
||||
MatchMode::Regex(raw) => write!(f, "~{}", raw.as_str()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_matcher {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_create() {}
|
||||
|
||||
#[test]
|
||||
fn test_text() {
|
||||
let matcher = Matcher::new("example.com").unwrap();
|
||||
assert!(matcher.is_match("example.com"));
|
||||
assert!(!matcher.is_match("-example.com"));
|
||||
assert!(!matcher.is_match("example.com.cn"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_wildcard() {
|
||||
let matcher = Matcher::new("*").unwrap();
|
||||
assert!(matcher.is_match("localhost"));
|
||||
assert!(!matcher.is_match(".localhost"));
|
||||
assert!(!matcher.is_match("localhost."));
|
||||
assert!(!matcher.is_match("local.host"));
|
||||
|
||||
let matcher = Matcher::new("*.com").unwrap();
|
||||
assert!(matcher.is_match("test.com"));
|
||||
assert!(matcher.is_match("example.com"));
|
||||
assert!(!matcher.is_match("test.test"));
|
||||
assert!(!matcher.is_match(".test.com"));
|
||||
assert!(!matcher.is_match("test.com."));
|
||||
assert!(!matcher.is_match("test.test.com"));
|
||||
|
||||
let matcher = Matcher::new("*.*").unwrap();
|
||||
assert!(matcher.is_match("test.test"));
|
||||
assert!(!matcher.is_match(".test.test"));
|
||||
assert!(!matcher.is_match("test.test."));
|
||||
assert!(!matcher.is_match("test.test.test"));
|
||||
|
||||
let matcher = Matcher::new("*.example.com").unwrap();
|
||||
assert!(matcher.is_match("test.example.com"));
|
||||
assert!(matcher.is_match("example.example.com"));
|
||||
assert!(!matcher.is_match("test.example.com.com"));
|
||||
assert!(!matcher.is_match("test.test.example.com"));
|
||||
|
||||
let matcher = Matcher::new("*.example.*").unwrap();
|
||||
assert!(matcher.is_match("test.example.com"));
|
||||
assert!(matcher.is_match("example.example.com"));
|
||||
assert!(!matcher.is_match("test.test.example.test"));
|
||||
assert!(!matcher.is_match("test.example.test.test"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_regex() {
|
||||
let matcher = Matcher::new("~^example.com$").unwrap();
|
||||
assert!(matcher.is_match("example.com"));
|
||||
assert!(!matcher.is_match("test.example.com"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_to_string() {}
|
||||
}
|
||||
20
src/watch.rs
20
src/watch.rs
@@ -1,11 +1,15 @@
|
||||
use futures::ready;
|
||||
use futures::{prelude::*, ready};
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
time::{Duration, SystemTime},
|
||||
};
|
||||
use tokio::{fs::File, io::Result, prelude::*, timer::Interval};
|
||||
use tokio::{
|
||||
fs::File,
|
||||
io::Result,
|
||||
time::{interval, Interval},
|
||||
};
|
||||
|
||||
pub struct Watch {
|
||||
path: PathBuf,
|
||||
@@ -15,13 +19,13 @@ pub struct Watch {
|
||||
}
|
||||
|
||||
impl Watch {
|
||||
pub async fn new<P: AsRef<Path>>(path: P, duration: u64) -> Watch {
|
||||
pub async fn new<P: AsRef<Path>>(path: P, duration: Duration) -> Watch {
|
||||
let path = path.as_ref().to_path_buf();
|
||||
Watch {
|
||||
path: path.clone(),
|
||||
state: None,
|
||||
modified: Self::modified(path).await,
|
||||
timer: Interval::new_interval(Duration::from_millis(duration)),
|
||||
timer: interval(duration),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +40,10 @@ impl Watch {
|
||||
return true;
|
||||
}
|
||||
} else if a.is_err() && b.is_err() {
|
||||
let left = a.as_ref().err().unwrap();
|
||||
let right = b.as_ref().err().unwrap();
|
||||
if left.kind() == right.kind() && left.raw_os_error() == right.raw_os_error() {
|
||||
return true;
|
||||
if let (Some(left), Some(right)) = (a.as_ref().err(), b.as_ref().err()) {
|
||||
if left.kind() == right.kind() && left.raw_os_error() == right.raw_os_error() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user