From 18fc64875506afbee34db2baaaae342e700e99fe Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:54:59 -0400 Subject: [PATCH 01/14] Create nixpacks.toml Trying to block apple ipa verification servers --- nixpacks.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 nixpacks.toml diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..4aa4fe2 --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,17 @@ +# nixpacks.toml +[phases.setup] +nixPkgs = ["...", "netcat"] # Keep netcat for your 8081 health check + +[phases.build] +# Use 'sudo' if the environment is restricted, though usually not needed here +cmds = [ + "echo '127.0.0.1 ocsp.apple.com' >> /etc/hosts", + "echo '127.0.0.1 ppq.apple.com' >> /etc/hosts", + "echo '127.0.0.1 ocsp2.apple.com' >> /etc/hosts", + "echo '127.0.0.1 valid.apple.com' >> /etc/hosts", + "echo '127.0.0.1 certs.apple.com' >> /etc/hosts" +] + +[start] +# Your required health-check loop + vproxy launch +cmd = "(while true; do echo -e 'HTTP/1.1 200 OK\n\n ok' | nc -l -p 8081; done &) && vproxy run --bind 0.0.0.0:$PORT http" From 5a39b3ea37d781b68ed4c97a357d571802a32fd9 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:46:16 -0400 Subject: [PATCH 02/14] Delete nixpacks.toml --- nixpacks.toml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 nixpacks.toml diff --git a/nixpacks.toml b/nixpacks.toml deleted file mode 100644 index 4aa4fe2..0000000 --- a/nixpacks.toml +++ /dev/null @@ -1,17 +0,0 @@ -# nixpacks.toml -[phases.setup] -nixPkgs = ["...", "netcat"] # Keep netcat for your 8081 health check - -[phases.build] -# Use 'sudo' if the environment is restricted, though usually not needed here -cmds = [ - "echo '127.0.0.1 ocsp.apple.com' >> /etc/hosts", - "echo '127.0.0.1 ppq.apple.com' >> /etc/hosts", - "echo '127.0.0.1 ocsp2.apple.com' >> /etc/hosts", - "echo '127.0.0.1 valid.apple.com' >> /etc/hosts", - "echo '127.0.0.1 certs.apple.com' >> /etc/hosts" -] - -[start] -# Your required health-check loop + vproxy launch -cmd = "(while true; do echo -e 'HTTP/1.1 200 OK\n\n ok' | nc -l -p 8081; done &) && vproxy run --bind 0.0.0.0:$PORT http" From 49676f4da0ba4238f0333bf012ab0bb22397921d Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Wed, 13 May 2026 23:01:44 -0400 Subject: [PATCH 03/14] Update Dockerfile to expose port and set CMD Expose port 8080 and set default command for HTTP proxy. --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbadf96..3047e09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,5 +22,8 @@ COPY --from=builder /app/target/release/vproxy /bin/vproxy # Iproute2 and procps are needed for the vproxy to work RUN apk add --no-cache iproute2 procps -# Set the entrypoint -ENTRYPOINT ["/bin/vproxy"] +# Expose port 8080 for HTTP proxy +EXPOSE 8080 + +# Default command: run HTTP proxy on 0.0.0.0:8080 +CMD ["/bin/vproxy", "run", "--bind", "0.0.0.0:8080", "http"] From 3d62730a1ee67684ba88d9ff2d4178990ee6d760 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Wed, 13 May 2026 23:02:06 -0400 Subject: [PATCH 04/14] Add Koyeb configuration for Docker build and run --- koyeb.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 koyeb.yaml diff --git a/koyeb.yaml b/koyeb.yaml new file mode 100644 index 0000000..71113e9 --- /dev/null +++ b/koyeb.yaml @@ -0,0 +1,7 @@ +build: + docker: + dockerfile: Dockerfile +run: + command: /bin/vproxy run --bind 0.0.0.0:8080 http + expose: + - port: 8080 From d172562c9649d540f17aea139b490c56e720ee0a Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Wed, 13 May 2026 23:11:44 -0400 Subject: [PATCH 05/14] Simplify port exposure configuration in koyeb.yaml --- koyeb.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/koyeb.yaml b/koyeb.yaml index 71113e9..cf45928 100644 --- a/koyeb.yaml +++ b/koyeb.yaml @@ -3,5 +3,4 @@ build: dockerfile: Dockerfile run: command: /bin/vproxy run --bind 0.0.0.0:8080 http - expose: - - port: 8080 + port: 8080 From 33d73536409844df482e3bba20cba1baf638a884 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 02:30:24 -0400 Subject: [PATCH 06/14] Fix formatting in koyeb.yaml From d6bcbc4d98a05f2141130d38a5ef92cb4c0a45e3 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 02:55:03 -0400 Subject: [PATCH 07/14] Update Dockerfile for vproxy configuration changes --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3047e09..0afc3c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,20 +10,20 @@ WORKDIR /app # Copy the project files COPY . . -# Build the project +# Build the project in release mode RUN cargo build --release # Runtime stage FROM alpine:3.16 -# Copy the built binary from the builder stage -COPY --from=builder /app/target/release/vproxy /bin/vproxy - -# Iproute2 and procps are needed for the vproxy to work +# Install runtime dependencies RUN apk add --no-cache iproute2 procps -# Expose port 8080 for HTTP proxy -EXPOSE 8080 +# Copy the built binary from the builder stage +COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy + +# Expose port 9090 for TCP proxy access +EXPOSE 9090 -# Default command: run HTTP proxy on 0.0.0.0:8080 -CMD ["/bin/vproxy", "run", "--bind", "0.0.0.0:8080", "http"] +# Run vproxy HTTP proxy on 0.0.0.0:9090 +CMD ["vproxy", "run", "--bind", "0.0.0.0:9090", "http"] From 77b78311823ce98808fc6e34522d4e2ea424011f Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 02:55:33 -0400 Subject: [PATCH 08/14] Change vproxy command port from 8080 to 9090 --- koyeb.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koyeb.yaml b/koyeb.yaml index cf45928..b8b4394 100644 --- a/koyeb.yaml +++ b/koyeb.yaml @@ -2,5 +2,5 @@ build: docker: dockerfile: Dockerfile run: - command: /bin/vproxy run --bind 0.0.0.0:8080 http - port: 8080 + command: /bin/vproxy run --bind 0.0.0.0:9090 http + port: 9090 From 2f0628b9d70e356f3f7970600e77fb16d9a4ca16 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 03:27:01 -0400 Subject: [PATCH 09/14] Enhance Dockerfile with cloudflared support Updated Dockerfile to include curl installation and cloudflared setup. --- Dockerfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0afc3c6..51a0939 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,24 @@ # Build stage FROM rust:alpine3.20 AS builder -# Install build dependencies RUN apk add --no-cache musl-dev - -# Set the working directory WORKDIR /app - -# Copy the project files COPY . . - -# Build the project in release mode RUN cargo build --release # Runtime stage FROM alpine:3.16 -# Install runtime dependencies -RUN apk add --no-cache iproute2 procps +RUN apk add --no-cache iproute2 procps curl -# Copy the built binary from the builder stage +# Copy vproxy binary COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy -# Expose port 9090 for TCP proxy access +# Install cloudflared +RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared && \ + chmod +x /usr/local/bin/cloudflared + EXPOSE 9090 -# Run vproxy HTTP proxy on 0.0.0.0:9090 -CMD ["vproxy", "run", "--bind", "0.0.0.0:9090", "http"] +# Run both vproxy and cloudflared with tunnel token +CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel run --token eyJhIjoiNzEzMTEwODBmMDcxZTFkZWQ5NmQzNGZkNWIxMzMwZTAiLCJ0IjoiMjJhYjdkOWYtMjFhZC00NDQ0LWJlYzItZmQ5MGU3ZTYyYmQ2IiwicyI6IlpEazROekExTUdNdE9EZGlaUzAwTTJabExXRXpPVEl0WWpNME1tSTVOVFpoT1RJNCJ9' From 3ec46d09474f0f7ce8e04c9c4757bf864699627e Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 03:28:41 -0400 Subject: [PATCH 10/14] Update cloudflared tunnel token in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51a0939..564ba4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,4 @@ RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/c EXPOSE 9090 # Run both vproxy and cloudflared with tunnel token -CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel run --token eyJhIjoiNzEzMTEwODBmMDcxZTFkZWQ5NmQzNGZkNWIxMzMwZTAiLCJ0IjoiMjJhYjdkOWYtMjFhZC00NDQ0LWJlYzItZmQ5MGU3ZTYyYmQ2IiwicyI6IlpEazROekExTUdNdE9EZGlaUzAwTTJabExXRXpPVEl0WWpNME1tSTVOVFpoT1RJNCJ9' +CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel run --token eyJhIjoiNzEzMTEwODBmMDcxZTFkZWQ5NmQzNGZkNWIxMzMwZTAiLCJ0IjoiMjJhYjdkOWYtMjFhZC00NDQ0LWJlYzItZmQ5MGU3ZTYyYmQ2IiwicyI6Ik0yTXhZVGRtTXpJdE5tRTVOeTAwTURRekxUazRNRGN0WlRNNVpqUTJOamhqTkRNeiJ9' From 6720ad96507c8a8bfd71e7d3f589bdf1efcf617f Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 03:40:45 -0400 Subject: [PATCH 11/14] Update CMD to use cloudflared quick tunnel --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 564ba4d..3ddb72f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,5 +20,5 @@ RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/c EXPOSE 9090 -# Run both vproxy and cloudflared with tunnel token -CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel run --token eyJhIjoiNzEzMTEwODBmMDcxZTFkZWQ5NmQzNGZkNWIxMzMwZTAiLCJ0IjoiMjJhYjdkOWYtMjFhZC00NDQ0LWJlYzItZmQ5MGU3ZTYyYmQ2IiwicyI6Ik0yTXhZVGRtTXpJdE5tRTVOeTAwTURRekxUazRNRGN0WlRNNVpqUTJOamhqTkRNeiJ9' +# Run both vproxy and cloudflared quick tunnel +CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel --url localhost:9090' From c54d4e104101b8a65b7e7e5541109b48dca02c5e Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 04:06:11 -0400 Subject: [PATCH 12/14] Replace cloudflared with bore in Dockerfile --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ddb72f..90f452f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,11 @@ RUN apk add --no-cache iproute2 procps curl # Copy vproxy binary COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy -# Install cloudflared -RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared && \ - chmod +x /usr/local/bin/cloudflared +# Install bore +RUN curl -L https://github.com/ekzhang/bore/releases/latest/download/bore-x86_64-unknown-linux-musl -o /usr/local/bin/bore && \ + chmod +x /usr/local/bin/bore EXPOSE 9090 -# Run both vproxy and cloudflared quick tunnel -CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & cloudflared tunnel --url localhost:9090' +# Run both vproxy and bore tunnel +CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & bore local 9090 --to bore.pub' From 0e3239505a6f030e7eb009a4d1e49dc6279b8c5c Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 04:13:13 -0400 Subject: [PATCH 13/14] Modify Dockerfile to install bore using wget Updated Dockerfile to include wget for bore installation and changed the download method to use wget. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90f452f..1aa6d64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,13 @@ RUN cargo build --release # Runtime stage FROM alpine:3.16 -RUN apk add --no-cache iproute2 procps curl +RUN apk add --no-cache iproute2 procps curl wget # Copy vproxy binary COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy -# Install bore -RUN curl -L https://github.com/ekzhang/bore/releases/latest/download/bore-x86_64-unknown-linux-musl -o /usr/local/bin/bore && \ +# Install bore - use direct GitHub release download +RUN wget -O /usr/local/bin/bore https://github.com/ekzhang/bore/releases/download/v0.5.1/bore-x86_64-unknown-linux-musl && \ chmod +x /usr/local/bin/bore EXPOSE 9090 From 351e0c29d3f019afd52dbdc4ce049e166b71bf70 Mon Sep 17 00:00:00 2001 From: Nokoding <101128417+Nokoding@users.noreply.github.com> Date: Thu, 14 May 2026 04:17:06 -0400 Subject: [PATCH 14/14] Add bore-cli installation and update Dockerfile Install bore-cli during the build stage and copy binaries to runtime image. --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1aa6d64..2f512b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,22 +3,24 @@ FROM rust:alpine3.20 AS builder RUN apk add --no-cache musl-dev WORKDIR /app + +# Build vproxy COPY . . RUN cargo build --release +# Build bore from source +RUN cargo install bore-cli + # Runtime stage FROM alpine:3.16 -RUN apk add --no-cache iproute2 procps curl wget +RUN apk add --no-cache iproute2 procps -# Copy vproxy binary +# Copy binaries COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy - -# Install bore - use direct GitHub release download -RUN wget -O /usr/local/bin/bore https://github.com/ekzhang/bore/releases/download/v0.5.1/bore-x86_64-unknown-linux-musl && \ - chmod +x /usr/local/bin/bore +COPY --from=builder /usr/local/cargo/bin/bore /usr/local/bin/bore EXPOSE 9090 -# Run both vproxy and bore tunnel +# Run vproxy and bore tunnel CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & bore local 9090 --to bore.pub'