general cleanup
Some checks failed
Build and publish the docker image / build (push) Failing after 1m30s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn 2025-01-19 03:20:53 +03:00
parent 6f984fe7fd
commit 94b940d186
Signed by: ngn
GPG Key ID: A3654DF5AD9F641D
13 changed files with 39 additions and 465 deletions

View File

@ -0,0 +1,29 @@
name: Build and publish the docker image
on:
push:
branches: ["custom"]
env:
REGISTRY: git.ngn.tf
IMAGE: ${{gitea.repository}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: "https://github.com/actions/checkout@v4"
- name: Login to container repo
uses: "https://github.com/docker/login-action@v1"
with:
registry: ${{env.REGISTRY}}
username: ${{gitea.actor}}
password: ${{secrets.GITEA_TOKEN}}
- name: Build image
run: |
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest --tag ${{env.REGISTRY}}/${{env.IMAGE}}:${GITEA_REF##*/}
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:${GITEA_REF##*/}
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest

View File

@ -1,33 +0,0 @@
---
name: Bug report
about: 'Create a report to help us improve'
title: ''
labels: 'bug'
assignees: ''
---
Please make sure you're on the latest version before submitting.
# What's Happening?
<!-- Describe here -->
## How to reproduce:
<!-- Describe here -->
## Affected Platforms:
- [ ] macOS
- [ ] Windows
- [ ] Linux (Specify)
- [ ] iOS
- [ ] Android
Version:
## Browser:
- [ ] Chromium-based (ex: Brave or Chrome)
- [ ] Webkit-based (ex: Safari)
- [ ] Gecko-based (ex: Firefox)

View File

@ -1,15 +0,0 @@
---
name: Feature Request
about: 'Suggest a specific feature or enhancement'
title: ''
labels: 'enhancement'
assignees: ''
---
# What does the feature entail?
<!-- Describe here -->
# Why is this feature important?
<!-- Describe here -->

View File

@ -1,52 +0,0 @@
name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['release']
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
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@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# 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@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@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,4 +1,4 @@
FROM golang:1.22.1-alpine3.19 AS build
FROM golang:1.23.4-alpine3.19 AS build
WORKDIR /app
@ -9,23 +9,16 @@ RUN go mod download
COPY . .
# 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
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
RUN go build -o anonymousoverflow
FROM scratch
COPY --from=build /app/anonymousoverflow /anonymousoverflow
COPY --from=build /app/healthcheck /healthcheck
COPY templates /templates
COPY public /public
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /etc/ssl/certs /etc/ssl/certs
HEALTHCHECK --interval=60s --timeout=5s --start-period=2s --retries=3 CMD [ "/healthcheck","http://localhost:8080/healthz" ]
COPY templates /templates
COPY public /public
EXPOSE 8080
CMD ["/anonymousoverflow"]
CMD ["/anonymousoverflow"]

View File

@ -1,93 +1,2 @@
# AnonymousOverflow
AnonymousOverflow allows you to view StackOverflow threads without the cluttered interface and exposing your IP address, browsing habits and other browser fingerprint data to StackOverflow.
This project is super lightweight by design. The UI is simple and the frontend is served as an SSR HTML requiring no JavaScript.
## Screenshots
![Home](./docs/screenshots/home_dark.webp)
![Question](./docs/screenshots/question_dark.webp)
![Answer](./docs/screenshots/answers_light.webp)
## Instances
Visit the [AnonymousOverflow Hub](https://aohub.httpjames.space) for a list of instances.
## Why use AnonymousOverflow over StackOverflow?
- StackOverflow collects a lot of information
While it's understandable that StackOverflow collects a lot of technical data for product development, debugging and to serve the best experience to its users, not everyone wants their
> internet protocol (IP) address, [...] browser type and version, time zone setting and location, browser plug-in types and versions, operating system, and platform [...] data
to be collected and stored.
- StackOverflow shares your information with third-parties
StackOverflow does not sell your information, but it does share it with third-parties, including conglomerates.
> We also partner with other third parties, such as Google Ads and Microsoft Bing, to serve advertising content and manage advertising campaigns. When we use Google Ads or Microsoft Bing Customer Match for advertising campaigns, your personal data will be protected using hashed codes.
> Google users can control the ads that they see on Google services, including Customer Match ads, in their Google Ads Settings.
Their main website also [contains trackers from Alphabet](https://themarkup.org/blacklight?url=stackoverflow.com).
- Reduced clutter
StackOverflow has a cluttered UI that might distract you from the content you're trying to find. AnonymousOverflow simplifies the interface to make it easier to read and navigate.
## How to make Stack Overflow links take you to AnonymousOverflow automatically
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 [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
AnonymousOverflow uses the existing question endpoint that StackOverflow uses. Simply replace the domain name in the URL with the domain name of the AnonymousOverflow instance you're using and you'll be able to view the question anonymously.
Example:
```
https://stackoverflow.com/questions/43743250/using-libsodium-xchacha20-poly1305-for-large-files
```
becomes
```
${instanceURL}/questions/43743250/using-libsodium-xchacha20-poly1305-for-large-files
```
### Bookmark Conversion Tool
You can easily convert StackOverflow URLs to AnonymousOverflow ones by adding the following code as a bookmark in your web browser:
```js
javascript: (function () {
window.location = window.location
.toString()
.replace(/stackoverflow\.com/, 'code.whatever.social')
})()
```
Replace `code.whatever.social` with the domain name of the instance you're using if needed.
You can run this bookmarklet on any StackOverflow page to view it anonymously.
Thanks to [Manav from ente.io](https://ente.io/about) for the handy tool.
## How to deploy
Read the [wiki page](https://github.com/httpjamesm/AnonymousOverflow/wiki/Deployment).
## Attribution
- Icons provided by [heroicons](https://heroicons.com) under the [MIT License](https://choosealicense.com/licenses/mit/)
- [Gin](https://github.com/gin-gonic/gin) under the [MIT License](https://github.com/gin-gonic/gin/blob/master/LICENSE)
- [goquery](https://github.com/PuerkitoBio/goquery) under the [BSD 3-Clause License](https://github.com/PuerkitoBio/goquery/blob/master/LICENSE)
- [resty](https://github.com/go-resty/resty) under the [MIT License](https://github.com/go-resty/resty/blob/master/LICENSE)
- [Chroma](https://github.com/alecthomas/chroma) under the [MIT License](https://github.com/alecthomas/chroma/blob/master/COPYING)
- [KaTeX](https://github.com/KaTeX/KaTeX) under the [MIT License](https://github.com/KaTeX/KaTeX/blob/main/LICENSE)
# [ngn.tf] | AnonymousOverflow
A fork of the [AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow) project, with my personal changes.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@ -1,237 +0,0 @@
{
"clearnet": [
{
"url": "https://code.whatever.social",
"regions": ["Canada", "United States"],
"operators": ["https://whatever.social", "https://httpjames.space"]
},
{
"url": "https://ao.vern.cc",
"regions": ["United States"],
"operators": ["https://vern.cc"]
},
{
"url": "https://overflow.smnz.de",
"regions": ["Germany"],
"operators": ["https://smnz.de"]
},
{
"url": "https://overflow.lunar.icu",
"regions": ["Germany"],
"operators": ["https://lunar.icu/"]
},
{
"url": "https://overflow.adminforge.de/",
"regions": ["Germany"],
"operators": ["https://adminforge.de/"]
},
{
"url": "https://overflow.hostux.net/",
"regions": ["France"],
"operators": ["https://hostux.net/"]
},
{
"url": "https://overflow.projectsegfau.lt/",
"regions": ["United States", "Germany", "India"],
"operators": ["https://projectsegfau.lt/"]
},
{
"url": "https://code.xbdm.fun",
"regions": ["Germany"],
"operators": ["https://xbdm.fun"]
},
{
"url": "https://overflow.fascinated.cc/",
"regions": ["Germany"],
"operators": ["https://fascinated.cc/"]
},
{
"url": "https://ao.bloat.cat",
"regions": ["Germany"],
"operators": ["https://bloat.cat"]
},
{
"url": "https://anonoverflow.frontendfriendly.xyz/",
"regions": ["United States"],
"operators": ["https://frontendfriendly.xyz/"]
},
{
"url": "https://ao.owo.si/",
"regions": ["Germany"],
"operators": ["https://owo.si/"]
},
{
"url": "https://overflow.datura.network/",
"regions": ["Germany"],
"operators": ["https://datura.network"]
},
{
"url": "https://overflow.freedit.eu",
"regions": ["United States"],
"operators": ["https://freedit.eu"]
},
{
"url": "https://ao.rootdo.com",
"regions": ["Germany"],
"operators": ["https://rootdo.com"]
},
{
"url": "https://anonoverflow.hyperreal.coffee",
"regions": ["United States"],
"operators": ["https://hyperreal.coffee"]
},
{
"url": "https://o.sudovanilla.org",
"regions": ["United States"],
"operators": ["https://sudovanilla.org"]
},
{
"url": "https://anonymousoverflow.privacyfucking.rocks/",
"regions": ["Germany"],
"operators": ["https://privacyfucking.rocks"]
},
{
"url": "https://exchange.seitan-ayoub.lol",
"regions": ["Germany"],
"operators": ["https://seitan-ayoub.lol"]
},
{
"url": "https://overflow.r4fo.com",
"regions": ["The Netherlands"],
"operators": ["https://r4fo.com"]
},
{
"url": "https://overflow.ducks.party",
"regions": ["The Netherlands"],
"operators": ["https://ducks.party"]
},
{
"url": "https://ao.ngn.tf",
"regions": ["Turkey"],
"operators": ["https://ngn.tf"]
},
{
"url": "https://overflow.snine.nl",
"regions": ["The Netherlands"],
"operators": ["https://snine.nl"]
},
{
"url": "https://anonymousoverflow.privacyredirect.com",
"regions": ["Finland"],
"operators": ["https://privacyredirect.com/"]
},
{
"url": "https://soflow.nerdvpn.de",
"regions": ["Ukraine"],
"operators": ["https://nerdvpn.de"]
},
{
"url": "https://overflow.einfachzocken.eu/",
"regions": ["Germany"],
"operators": ["https://einfachzocken.eu"]
},
{
"url": "https://overflow.seasi.dev/",
"regions": ["Singapore"],
"operators": ["https://seasi.dev/"]
},
{
"url": "https://anonymousoverflow.catsarch.com",
"regions": ["United States"],
"operators": ["https://catsarch.com"]
},
{
"url": "https://overflow.darkness.services/",
"regions": ["United States"],
"operators": ["https://zzz.darkness.services"]
},
{
"url": "https://anonflow.aketawi.space/",
"regions": ["Russia"],
"operators": ["https://www.aketawi.space/"]
},
{
"url": "https://anonymousoverflow.gitro.xyz",
"regions": ["Germany"],
"operators": ["https://gitro.xyz"]
},
{
"url": "https://ao.bunk.lol",
"regions": ["Iceland"],
"operators": ["https://bunk.lol"]
},
{
"url": "https://o.iii.st/",
"regions": ["Germany"],
"operators": ["https://iii.st/"]
},
{
"url": "https://overflow.canine.tools/",
"regions": ["United States"],
"operators": ["https://canine.tools/"]
}
],
"onion": [
{
"url": "http://ao.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
"regions": ["United States"],
"operators": ["https://vern.cc"]
},
{
"url": "http://overflow.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion/",
"regions": ["Germany"],
"operators": ["https://projectsegfau.lt/"]
},
{
"url": "http://overflow.daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/",
"regions": ["Germany"],
"operators": ["https://datura.network"]
},
{
"url": "http://ao.pk47sgwhncn5cgidm7bofngmh7lc7ukjdpk5bjwfemmyp27ovl25ikyd.onion/",
"regions": ["Germany"],
"operators": ["https://owo.si/"]
},
{
"url": "http://overflow.r4focoma7gu2zdwwcjjad47ysxt634lg73sxmdbkdozanwqslho5ohyd.onion",
"regions": ["The Netherlands"],
"operators": ["https://r4fo.com"]
},
{
"url": "http://anonymousoverflow.catsarchywsyuss6jdxlypsw5dc7owd5u5tr6bujxb7o6xw2hipqehyd.onion/",
"regions": ["United States"],
"operators": ["https://catsarch.com"]
},
{
"url": "http://overflow.darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion/",
"regions": ["United States"],
"operators": [
"http://darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion/"
]
},
{
"url": "http://o.zx56doutynmbgezxtpccduajwcblzx7fgio2yuy57a3jingco2c6fvqd.onion/",
"regions": ["Germany"],
"operators": ["https://iii.st/"]
}
],
"i2p": [
{
"url": "http://vernmzgraj6aaoafmehupvtkkynpaa67rxcdj2kinwiy6konn6rq.b32.i2p",
"regions": ["United States"],
"operators": ["https://vern.cc"]
},
{
"url": "http://ay7akchgdh76r4lc62hzd52z6xqoh67loototsetvqxo5o7ngo5q.b32.i2p/",
"regions": ["Germany"],
"operators": ["https://owo.si/"]
},
{
"url": "http://ocp7zhdsbl2mjabv5ma5jvbzg2dqzglieayjvyj4j2r7qvsqlboa.b32.i2p/",
"regions": ["United States"],
"operators": ["https://catsarch.com"]
}
]
}

View File

@ -5,7 +5,7 @@
:root,
[data-theme="dark"] {
--main-bg: #1b1f26;
--main-bg: #000;
--text-color: #fff;
--muted-text-color: #b3b3b3;
--input-bg: #2b303b;

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
if len(os.Args) < 2 {
log.Fatal("Expected URL as command-line argument")
os.Exit(1)
}
url := os.Args[1]
fmt.Println(url)
if _, err := http.Get(url); err != nil {
os.Exit(1)
}
}