mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2024-12-06 19:16:43 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9babb62afc | |||
| 455b9c1ec6 | |||
| 4ce99662f3 | |||
| 1a7635ccef | |||
| 4c971f3121 |
@@ -22,9 +22,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
@@ -32,16 +36,17 @@ jobs:
|
||||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
|
||||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
|
||||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.22.1-alpine3.19 as build
|
||||
FROM golang:1.22.1-alpine3.19 AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -9,7 +9,10 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
# Architecture and OS are set dynamically (by BuildKit)
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
|
||||
|
||||
RUN go build -o anonymousoverflow && go build -o healthcheck ./src/healthcheck
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ StackOverflow has a cluttered UI that might distract you from the content you're
|
||||
|
||||
The open-source [Libredirect](https://github.com/libredirect/libredirect) extension for Firefox and Chromium-based desktop browsers has support for redirections to AnonymousOverflow. To enable this, simply open the extension settings, click on Stack Overflow, then toggle "Enable". That's it, now Stack Overflow links will go to AnonymousOverflow.
|
||||
|
||||
The open-source [FREEdirector](https://openuserjs.org/scripts/sjehuda/FREEdirector) user.js script for web browsers with userscript support. You can install it with a web extension like [Greasemonkey](https://greasespot.net/), [Tampermonkey](https://tampermonkey.net/) or [Violentmonkey](https://violentmonkey.github.io/). Once installed, Stack Overflow links will go to AnonymousOverflow.
|
||||
The open-source [Proxy_Redirect](https://openuserjs.org/scripts/sjehuda/Proxy_Redirect) user.js script for web browsers with userscript support. You can install it with a web extension like [Greasemonkey](https://greasespot.net/), [Tampermonkey](https://tampermonkey.net/) or [Violentmonkey](https://violentmonkey.github.io/). Once installed, Stack Overflow links will go to AnonymousOverflow.
|
||||
|
||||
## How it works
|
||||
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@
|
||||
{
|
||||
"url": "https://soflow.nerdvpn.de",
|
||||
"regions": ["Ukraine"],
|
||||
"operators": ["https://github.com/Sommerwiesel"]
|
||||
"operators": ["https://nerdvpn.de"]
|
||||
},
|
||||
{
|
||||
"url": "https://overflow.einfachzocken.eu/",
|
||||
|
||||
@@ -86,6 +86,8 @@ func main() {
|
||||
|
||||
r.GET("/proxy", routes.GetImage)
|
||||
|
||||
r.GET("/version", routes.GetVersion)
|
||||
|
||||
soPingCheck := checks.NewPingCheck("https://stackoverflow.com", "GET", 5000, nil, nil)
|
||||
sePingCheck := checks.NewPingCheck("https://stackexchange.com", "GET", 5000, nil, nil)
|
||||
healthcheck.New(r, config.DefaultConfig(), []checks.Check{soPingCheck, sePingCheck})
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"anonymousoverflow/config"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func GetVersion(c *gin.Context) {
|
||||
c.String(200, config.Version)
|
||||
}
|
||||
Reference in New Issue
Block a user