Skip to content

Commit

Permalink
Merge pull request #38 from ryboe/master
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmwagar committed May 23, 2023
2 parents aa083b3 + b12409a commit ba17be6
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
should_build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build image
uses: docker/build-push-action@v4
with:
cache-from: type=gha
# linux/amd64 supports all x86 CPUs
# linux/amd64/v2 supports x86 CPUs from 2010+
# linux/amd64/v3 supports x86 CPUs from 2015+
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64
pull: true
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- master

jobs:
build_and_upload_image:
runs-on: ubuntu-latest
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and Push
uses: docker/build-push-action@v4
with:
# linux/amd64 supports all x86 CPUs
# linux/amd64/v2 supports x86 CPUs from 2010+
# linux/amd64/v3 supports x86 CPUs from 2015+
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
# mode=max means "cache everything possible". This ensures maximum
# use of the cache, but will use up GitHub's 10 GB cache size limit
# faster.
cache-to: type=gha,mode=max
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# syntax=docker/dockerfile:1
FROM rust:alpine as builder
RUN apk add --no-cache build-base

# Don't download the entire crates.io package index. Fetch only the index
# entries for crates that are actually used. This is faster and avoids a memory
# usage explosion that often breaks docker builds.
# https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html#background
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"

WORKDIR /app/
COPY Cargo.toml Cargo.lock ./
COPY src/ src/
RUN cargo build --release

FROM alpine:3.17
FROM alpine:3.18
RUN addgroup -S merino && \
adduser -S -G merino merino && \
apk add --no-cache tini
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ cd merino
cargo install --path .
```

OR

```bash
docker image pull ghcr.io/ajmwagar/merino:latest
```

### Usage

```bash
Expand All @@ -53,21 +59,27 @@ merino --no-auth
merino --users users.csv

# Display a help menu
merino --help
merino --help
```

OR

```bash
docker container run --pull=always --name=merino -p=8001:8001 ghcr.io/ajmwagar/merino:latest --no-auth --port=8001
```

# 🚥 Roadmap

- [x] IPV6 Support
- [ ] `SOCKS5` Authentication Methods
- [x] `NOAUTH`
- [x] `NOAUTH`
- [x] `USERPASS`
- [ ] `GSSAPI` Coming Soon!
- [ ] Custom plugin/middleware support
- [ ] `SOCKS5` Commands
- [x] `CONNECT`
- [ ] `BIND`
- [ ] `ASSOCIATE`
- [ ] `ASSOCIATE`
- [ ] Benchmarks & Unit tests
- [ ] [Actix](https://github.com/actix-rs/actix) based backend
- [ ] `SOCKS4`/`SOCKS4a` Support

0 comments on commit ba17be6

Please sign in to comment.