Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3.0 #43

Merged
merged 94 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
4719f71
feat: change logging module from env_logger + log to tracing + tracin…
junkurihara Jun 22, 2023
d8856e4
Merge pull request #26 from junkurihara/feat/tracing
junkurihara Jun 22, 2023
865f929
deps
junkurihara Jun 28, 2023
0fb48b7
docs: add badge
junkurihara Jun 28, 2023
fb61dbd
deps
junkurihara Jul 5, 2023
41ae3c0
make proxy suppl services simple
junkurihara Jul 6, 2023
5d4c0f9
fix: global names
junkurihara Jul 6, 2023
ee65688
update
junkurihara Jul 6, 2023
0007ee5
deps
junkurihara Aug 21, 2023
15ad3ff
chore: change alloc from jemalloc to mimalloc
junkurihara Aug 21, 2023
e20dd39
deps: update trust-dns
junkurihara Aug 24, 2023
c6a440f
restructure: add reloader service to the config file. todo: add reloa…
junkurihara Aug 28, 2023
fd1bc9b
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
6335201
Merge pull request #32 from junkurihara/dependabot/github_actions/act…
junkurihara Sep 5, 2023
84091c8
deps and github actions
junkurihara Sep 14, 2023
e94d097
Merge branch 'develop' into restructure/0.3.0
junkurihara Sep 14, 2023
1889c8b
deps
junkurihara Oct 5, 2023
0e46b63
migrating to the new framework
junkurihara Oct 5, 2023
c295030
add note
junkurihara Oct 5, 2023
e78d507
refactor: config loader
junkurihara Oct 6, 2023
9c56f9f
feat: implementing authenticator from scratch
junkurihara Oct 20, 2023
a22961b
chore: refactor
junkurihara Oct 20, 2023
410afd0
chore: considering to implement auth client lib in rust-token-server …
junkurihara Oct 23, 2023
858190c
chore: refactor
junkurihara Oct 23, 2023
856aef2
Merge branch 'restructure/0.3.0' of github.com:junkurihara/doh-auth-p…
junkurihara Oct 23, 2023
e9c2ddf
feat: remove auth lib and call external rust-token-server-client crate
junkurihara Oct 23, 2023
7b3a2c4
feat: add stub for auth reloader service
junkurihara Oct 23, 2023
612d54b
feat: auth client periodic watch service
junkurihara Oct 24, 2023
ebc1ca3
feat: wip http_client
junkurihara Oct 24, 2023
faea387
feat: implement udp and tcp proxies
junkurihara Oct 25, 2023
2c8f2b2
fix: fix bug of listen addresses
junkurihara Oct 25, 2023
80c9ae3
chore: refactor
junkurihara Oct 25, 2023
eba3516
feat: implement endpoint ip resolution service
junkurihara Oct 25, 2023
f3944a0
chore: comment
junkurihara Oct 25, 2023
1ede9fb
chore: fix commit
junkurihara Oct 25, 2023
2fba7f1
chore: add stub and refactor
junkurihara Oct 25, 2023
b1e39a8
feat: path manager (wip)
junkurihara Oct 26, 2023
771b3ef
feat: wip: all possible paths
junkurihara Oct 26, 2023
e427200
feat: wip: path manager
junkurihara Oct 27, 2023
15e48c7
feat: wip: path manager
junkurihara Oct 27, 2023
8a87d35
feat: odoh config watch service
junkurihara Oct 27, 2023
352d69c
chore: trust-dns is now hickory-dns
junkurihara Oct 27, 2023
62089ff
feat: impl standard doh client
junkurihara Oct 27, 2023
7710172
feat: implement odoh client
junkurihara Oct 27, 2023
c297fbc
feat: endpoint ip update service with doh resolver itself
junkurihara Oct 27, 2023
135a0e3
chore: add comments
junkurihara Oct 27, 2023
a5f3d79
feat: wip healthcheck service for paths
junkurihara Oct 27, 2023
da3135e
feat: wip healthcheck service. done framework.
junkurihara Oct 30, 2023
1b4af7d
feat: refactor doh_client_main for calling from healthcheck
junkurihara Oct 30, 2023
72e98e5
feat: implement health check service
junkurihara Oct 30, 2023
89dd335
feat: wip implementation plugin reloader
junkurihara Oct 31, 2023
0350fba
feat: implement domain override manipulator
junkurihara Oct 31, 2023
98a4e77
feat: implement domain block manipulator
junkurihara Oct 31, 2023
1aecbbd
feat: implement manipulrators as trait objects, which should be chang…
junkurihara Nov 1, 2023
cf88b85
feat: impl plugins
junkurihara Nov 1, 2023
aa19284
Merge pull request #37 from junkurihara/feat/impl-plugins
junkurihara Nov 1, 2023
5e1727f
chore: deps
junkurihara Nov 2, 2023
dae76aa
feat: update release action
junkurihara Nov 2, 2023
d54c13a
chore: fix bugs in dockerfile
junkurihara Nov 2, 2023
926e284
Merge pull request #38 from junkurihara/restructure/0.3.0
junkurihara Nov 2, 2023
f5616df
Update README.md
junkurihara Nov 2, 2023
06de130
Update README.md
junkurihara Nov 2, 2023
ef40879
chore: deps
junkurihara Nov 13, 2023
3428f90
chore(deps): update itertools requirement in /dap-lib
dependabot[bot] Nov 15, 2023
08e8a0b
Merge pull request #39 from junkurihara/dependabot/cargo/dap-lib/iter…
junkurihara Nov 15, 2023
9abfca9
fix docker entrypoint
junkurihara Nov 15, 2023
89b41f1
fix: user agent
junkurihara Nov 15, 2023
65aca12
chore: fix dir name
junkurihara Nov 15, 2023
8d3b08c
feat: configurable user agent
junkurihara Nov 15, 2023
57bba94
Merge pull request #40 from junkurihara/feat/user-agent
junkurihara Nov 15, 2023
4529ce0
changelog [ci skip]
junkurihara Nov 15, 2023
7f96e66
Merge branch 'develop' of github.com:junkurihara/doh-auth-proxy into …
junkurihara Nov 15, 2023
735c750
chore: refactor
junkurihara Nov 16, 2023
7eeea4a
add odoh config request accept header
junkurihara Nov 20, 2023
bb0cf69
fix: fix bug for standard doh
junkurihara Nov 20, 2023
2c3d5cf
fix: fix bug for ip address host name
junkurihara Nov 20, 2023
9ca2091
chore: deps
junkurihara Nov 21, 2023
86b91dc
fix: fix bug for path max length
junkurihara Nov 30, 2023
54ed448
deps
junkurihara Dec 4, 2023
eecfe5e
fix: fix bug for udp count decrement
junkurihara Dec 6, 2023
9596916
chore: use timeout for udp channel
junkurihara Dec 6, 2023
d2daa30
fix: change counter to increment only one for safety
junkurihara Dec 6, 2023
4dc00bc
Merge pull request #42 from junkurihara/fix/increment-only-counter
junkurihara Dec 6, 2023
6a7bb04
chore: change visibility
junkurihara Dec 6, 2023
3256180
deps
junkurihara Dec 6, 2023
b12e070
deps
junkurihara Dec 6, 2023
8054ce3
deps
junkurihara Dec 6, 2023
1d4c4b1
Merge branch 'develop' of github.com:junkurihara/doh-auth-proxy into …
junkurihara Dec 6, 2023
24b1dbf
fix: fix bug for id token extraction
junkurihara Dec 6, 2023
51ad317
deps
junkurihara Dec 18, 2023
4e59044
deps and fix exit message
junkurihara Dec 26, 2023
da140e4
chore: update healthcheck termination
junkurihara Dec 27, 2023
9c04cd6
deps
junkurihara Jan 4, 2024
4ef2751
chore: remove unused
junkurihara Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,30 @@ version: 2
updates:
# Enable version updates for cargo
- package-ecosystem: "cargo"
# Look for `Cargo.toml` and `lock` files in the `root` directory
directory: "/"
# Check the crates.io for updates every day (weekdays)
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "/proxy-bin"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "/proxy-lib"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "/legacy"
schedule:
interval: "daily"

# Enable version updates for Docker
- package-ecosystem: "docker"
# Look for a `Dockerfile` in the `root` directory
directory: "/"
# Check for updates everyday
directory: "/docker"
schedule:
interval: "daily"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates everyday
interval: "daily"
49 changes: 0 additions & 49 deletions .github/workflows/docker_build_push.yml

This file was deleted.

113 changes: 113 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Nightly and release build

on:
push:
branches:
- "develop"
pull_request:
types: [closed]
branches:
- main

env:
GHCR: ghcr.io
GHCR_IMAGE_NAME: ${{ github.repository }}
DH_REGISTRY_NAME: jqtype/doh-auth-proxy

jobs:
docker_build_and_push:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
strategy:
fail-fast: false

steps:
- name: checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Release Build and push x86_64
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }}
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:latest
${{ env.DH_REGISTRY_NAME }}:latest
file: ./docker/Dockerfile
cache-from: type=gha,scope=doh-auth-proxy-latest
cache-to: type=gha,mode=max,scope=doh-auth-proxy-latest
labels: ${{ steps.meta.outputs.labels }}

- name: Nightly build and push x86_64
if: ${{ (github.ref_name == 'develop') && (github.event_name == 'push') }}
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:nightly
${{ env.DH_REGISTRY_NAME }}:nightly
file: ./docker/Dockerfile
cache-from: type=gha,scope=doh-auth-proxy-nightly
cache-to: type=gha,mode=max,scope=doh-auth-proxy-nightly
labels: ${{ steps.meta.outputs.labels }}

dispatch_release:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }}
needs: docker_build_and_push
steps:
- name: check pull_request title
uses: kaisugi/[email protected]
id: regex-match
with:
text: ${{ github.event.pull_request.title }}
regex: "^(\\d+\\.\\d+\\.\\d+)$"

- name: checkout
if: ${{ steps.regex-match.outputs.match != '' }}
uses: actions/checkout@v4

- name: build release binary
if: ${{ steps.regex-match.outputs.match != '' }}
id: "build"
run: |
cargo build --release --package doh-auth-proxy
cp ./target/release/doh-auth-proxy /tmp/doh-auth-proxy
cd /tmp
tar zcvf doh-auth-proxy-x86_64-unknown-linux-gnu.tar.gz doh-auth-proxy

- name: release
if: ${{ steps.regex-match.outputs.match != ''}}
uses: softprops/action-gh-release@v1
with:
files: /tmp/assets/*.tar.gz
name: ${{ github.event.pull_request.title }}
tag_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
draft: true
prerelease: false
generate_release_notes: true
2 changes: 1 addition & 1 deletion .github/workflows/shiftleft-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
Scan-Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Perform ShiftLeft Scan
uses: ShiftLeftSecurity/scan-action@master
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Unit test for some mods in doh-auth-proxy
name: Unit tests

on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main, develop ]
branches: [main, develop]

env:
CARGO_TERM_COLOR: always

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Run unit tests
run: |
cargo test --verbose
- uses: actions/checkout@v4
- name: Run unit tests
run: |
cargo test --verbose
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
.vscode
log
plugins
!src/plugins
!**/src/plugins

# Generated by Cargo
# will have compiled files and executables
/target/
legacy/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,28 @@
You should also include the user name that made the change.
-->

## 0.1.6 (unreleased)
## 0.3.0 (Unreleased)

### Improvements

- Totally restructured and reimplemented all components
- [Breaking] Support multiple bootstrap resolvers, which requires to modify the config file.
- Periodic health check of all path candidates.
- Periodic nexthop IP address resolution via the proxy itself, bootstrap resolver is only used at the first time and fall-back.
- Periodic fetching of access token with refresh token.
- Hot reloading of configuration files, including block and override files.
- Configurable "user-agent" as whatever you like.

## 0.2.0

### Improvements

- Docker UID:GID: Update Dockerfiles to allow arbitrary UID and GID (non-root users) for rpxy. Now they can be set as you like by specifying through env vars.
- Refactor: Various minor improvements
- Change inner structure of proxy's supplemental services other than UDP/TCP acceptors.

## 0.1.5 (Jun. 6, 2022)

### Improvements

- Update override-list format to use individual lines for representing multiple matching for a name, i.e., (name, IPv4) and (name, IPv6).
Expand Down
77 changes: 4 additions & 73 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,77 +1,8 @@
[package]
name = "doh-auth-proxy"
description = "DNS Proxy for DoH, ODoH and Mutualized ODoH with Authorization"
version = "0.1.6"
authors = ["Jun Kurihara"]
homepage = "https://github.com/junkurihara/doh-auth-proxy"
repository = "https://github.com/junkurihara/doh-auth-proxy"
license = "MIT"
readme = "README.md"
categories = [
"asynchronous",
"network-programming",
"command-line-utilities",
"web-programming::http-client",
]
keywords = [
"dns",
"https",
"dns-over-https",
"doh",
"oblivious-dns-over-https",
"odoh",
"mutualized-odoh",
"proxy",
"authorization",
]
edition = "2021"
[workspace]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
data-encoding = "2.4.0"
clap = { version = "4.3.5", default-features = false, features = [
"std",
"cargo",
"wrap_help",
] }
env_logger = "0.10.0"
log = "0.4.19"
tokio = { version = "1.28.2", features = [
"net",
"rt-multi-thread",
"parking_lot",
"time",
"sync",
"macros",
] }
futures = { version = "0.3.28", default-features = false }
reqwest = { version = "0.11.18", features = ["default", "trust-dns", "json"] }
url = "2.4.0"
trust-dns-proto = { version = "0.22.0", default-features = false }
trust-dns-resolver = { version = "0.22.0", default-features = false }
anyhow = "1.0.71"
dotenv = "0.15.0"
serde_json = "1.0.97"
jwt-simple = "0.11.5"
p256 = { version = "0.13.2", features = ["jwk", "pem"] }
chrono = "0.4.26"
odoh-rs = { git = "https://github.com/junkurihara/odoh-rs.git" }
rand = "0.8.5"
bytes = "1.4.0"
urlencoding = "2.1.2"
toml = { version = "0.7.4", default-features = false, features = ["parse"] }
serde = "1.0.164"
hashlink = "0.8.3"
cedarwood = "0.4.6"
regex = "1.8.4"
rustc-hash = "1.1.0"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5.0"

[dev-dependencies]
trust-dns-client = "0.22.0"
members = ["proxy-bin", "proxy-lib"]
exclude = ["legacy"]
resolver = "2"

[profile.release]
codegen-units = 1
Expand Down
Loading