diff --git a/goproxy/DOCS.md b/goproxy/DOCS.md deleted file mode 100644 index 8b3353ee4..000000000 --- a/goproxy/DOCS.md +++ /dev/null @@ -1,168 +0,0 @@ -# Home Assistant Community Add-on: GoProxy - -The GoProxy is a high-performance http proxy, https proxy, socks5 proxy, ss proxy, websocket proxies, tcp proxies, udp proxies, game shield, game proxies. Support forward proxies, reverse proxy, transparent proxy, internet nat proxies, https proxy load balancing, http proxy load balancing , socks5 proxies load balancing, socket proxy load balancing, ss proxy load balancing, TCP / UDP port mapping, SSH transit, TLS encrypted transmission, protocol conversion, anti-pollution DNS proxy, API authentication, speed limit, limit connection. Reverse proxies to help you expose a local server behind a NAT or firewall to the internet so that you or your visitors can access it directly and easily. - -Project url : https://github.com/snail007/goproxy - -## Installation - -The installation of this add-on is pretty straightforward and not different in -comparison to installing any other Home Assistant add-on. - -1. Search for the "Bitwarden RS" add-on in the Supervisor add-on store and - install it. -1. Start the "Bitwarden RS" add-on. -1. Check the logs of the "Bitwarden RS" add-on to see if everything went - well and to get the admin token/password. -1. Click the "OPEN WEB UI" button to open Bitwarden RS. -1. Add `/admin` to the URL to access the admin panel, e.g., - `http://hassio.local:7277/admin`. Log in using the admin token you got - in step 3. -1. The admin/token in the logs is only shown until it is saved or changed. - Hit save in the admin panel to use the randomly generated password or - change it to one of your choosing. -1. Be sure to store your admin token somewhere safe. - -## Configuration - -**Note**: _Remember to restart the add-on when the configuration is changed._ - -Example add-on configuration: - -```yaml -log_level: info -ssl: false -certfile: fullchain.pem -keyfile: privkey.pem -request_size_limit: 10485760 -``` - -**Note**: _This is just an example, don't copy and paste it! Create your own!_ - -### Option: `log_level` - -The `log_level` option controls the level of log output by the addon and can -be changed to be more or less verbose, which might be useful when you are -dealing with an unknown issue. Possible values are: - -- `trace`: Show every detail, like all called internal functions. -- `debug`: Shows detailed debug information. -- `info`: Normal (usually) interesting events. -- `warning`: Exceptional occurrences that are not errors. -- `error`: Runtime errors that do not require immediate action. -- `fatal`: Something went terribly wrong. Add-on becomes unusable. - -Please note that each level automatically includes log messages from a -more severe level, e.g., `debug` also shows `info` messages. By default, -the `log_level` is set to `info`, which is the recommended setting unless -you are troubleshooting. - -### Option: `ssl` - -Enables/Disables SSL (HTTPS). Set it `true` to enable it, `false` otherwise. - -**Note**: _The SSL settings only apply to direct access and has no effect -on the Ingress service._ - -### Option: `certfile` - -The certificate file to use for SSL. - -**Note**: _The file MUST be stored in `/ssl/`, which is the default_ - -### Option: `keyfile` - -The private key file to use for SSL. - -**Note**: _The file MUST be stored in `/ssl/`, which is the default_ - -### Option: `request_size_limit` - -By default the API calls are limited to 10MB. This should be sufficient for -most cases, however if you want to support large imports, this might be -limiting you. On the other hand you might want to limit the request size to -something smaller than that to prevent API abuse and possible DOS attack, -especially if running with limited resources. - -To set the limit, you can use this setting: 10MB would be `10485760`. - -## Known issues and limitations - -- This add-on cannot support Ingress at this time due to technical limitations - of the Bitwarden Vault web interface. -- Some web browsers, like Chrome, disallow the use of Web Crypto APIs in - insecure contexts. In this case, you might get an error like - `Cannot read property 'importKey'`. To solve this problem, you need to enable - SSL and access the web interface using HTTPS. - -## Changelog & Releases - -This repository keeps a change log using [GitHub's releases][releases] -functionality. The format of the log is based on -[Keep a Changelog][keepchangelog]. - -Releases are based on [Semantic Versioning][semver], and use the format -of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented -based on the following: - -- `MAJOR`: Incompatible or major changes. -- `MINOR`: Backwards-compatible new features and enhancements. -- `PATCH`: Backwards-compatible bugfixes and package updates. - -## Support - -Got questions? - -You have several options to get them answered: - -- The [Home Assistant Community Add-ons Discord chat server][discord] for add-on - support and feature requests. -- The [Home Assistant Discord chat server][discord-ha] for general Home - Assistant discussions and questions. -- The Home Assistant [Community Forum][forum]. -- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit] - -You could also [open an issue here][issue] GitHub. - -## Authors & contributors - -The original setup of this repository is by [Franck Nijhof][frenck]. - -For a full list of all authors and contributors, -check [the contributor's page][contributors]. - -## License - -MIT License - -Copyright (c) 2019-2020 Franck Nijhof - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -[goproxy-rs]: https://github.com/dani-garcia/goproxy_rs -[contributors]: https://github.com/hassio-addons/addon-goproxy/graphs/contributors -[discord-ha]: https://discord.gg/c5DvZ4e -[discord]: https://discord.me/hassioaddons -[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-goproxy-rs/115573?u=frenck -[frenck]: https://github.com/frenck -[issue]: https://github.com/hassio-addons/addon-goproxy/issues -[keepchangelog]: http://keepachangelog.com/en/1.0.0/ -[reddit]: https://reddit.com/r/homeassistant -[releases]: https://github.com/hassio-addons/addon-goproxy/releases -[semver]: http://semver.org/spec/v2.0.0.htm diff --git a/goproxy/README.md b/goproxy/README.md deleted file mode 100644 index fbeac7ebc..000000000 --- a/goproxy/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Home assistant add-on: Goproxy (Bitwarden RS) - -# ⚠️ It is recommended to use the official addon (https://github.com/hassio-addons/addon-goproxy) instead of this fork. The only benefit of this fork is automated releases, now implemented in the offical one. ⚠️ - -[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium) - -![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fgoproxy%2Fconfig.json) -![Ingress](https://img.shields.io/badge/dynamic/json?label=Ingress&query=%24.ingress&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fgoproxy%2Fconfig.json) -![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fgoproxy%2Fconfig.json) - -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9c6cf10bdbba45ecb202d7f579b5be0e)](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade) -[![GitHub Super-Linter](https://img.shields.io/github/actions/workflow/status/alexbelgium/hassio-addons/weekly-supelinter.yaml?label=Lint%20code%20base)](https://github.com/alexbelgium/hassio-addons/actions/workflows/weekly-supelinter.yaml) -[![Builder](https://img.shields.io/github/actions/workflow/status/alexbelgium/hassio-addons/onpush_builder.yaml?label=Builder)](https://github.com/alexbelgium/hassio-addons/actions/workflows/onpush_builder.yaml) - -[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white - -_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_ - -[![Stargazers repo roster for @alexbelgium/hassio-addons](https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.github/stars2.svg)](https://github.com/alexbelgium/hassio-addons/stargazers) - -![downloads evolution](https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/goproxy/stats.png) - -## About - -Created by Frenck, please see documentation here : https://github.com/hassio-addons/addon-goproxy - -[repository]: https://github.com/alexbelgium/hassio-addons diff --git a/goproxy/build.yaml b/goproxy/build.yaml deleted file mode 100644 index 5acf20791..000000000 --- a/goproxy/build.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -build_from: - aarch64: ghcr.io/hassio-addons/base/aarch64:15.0.7 - amd64: ghcr.io/hassio-addons/base/amd64:15.0.7 - armv7: ghcr.io/hassio-addons/base/armv7:15.0.7 -codenotary: - signer: alexandrep.github@gmail.com diff --git a/goproxy/config.json b/goproxy/config.json deleted file mode 100644 index 62be667bc..000000000 --- a/goproxy/config.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "arch": [ - "aarch64", - "amd64", - "armv7" - ], - "codenotary": "alexandrep.github@gmail.com", - "description": "high performance proxy server", - "image": "ghcr.io/alexbelgium/goproxy-{arch}", - "init": false, - "map": [ - "addon_config:rw", - "ssl" - ], - "name": "Goproxy", - "options": { - "certfile": "fullchain.pem", - "keyfile": "privkey.pem", - "TZ": "Europe/Paris", - "ssl": true - }, - "ports": { - "7277/tcp": 7277 - }, - "ports_description": { - "7277/tcp": "Bitwarden Vault" - }, - "schema": { - "certfile": "str", - "keyfile": "str", - "TZ": "str", - "ssl": "bool" - }, - "slug": "goproxy", - "url": "https://github.com/alexbelgium/hassio-addons/tree/master/goproxy", - "version": "0.1", - "webui": "http://[HOST]:[PORT:7277]" -} diff --git a/goproxy/icon.png b/goproxy/icon.png deleted file mode 100644 index 0f6e25094..000000000 Binary files a/goproxy/icon.png and /dev/null differ diff --git a/goproxy/logo.png b/goproxy/logo.png deleted file mode 100644 index 0f6e25094..000000000 Binary files a/goproxy/logo.png and /dev/null differ diff --git a/goproxy/rootfs/etc/cont-init.d/99-run.sh b/goproxy/rootfs/etc/cont-init.d/99-run.sh deleted file mode 100644 index b546a781a..000000000 --- a/goproxy/rootfs/etc/cont-init.d/99-run.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/command/with-contenv bashio -# shellcheck shell=bash -set -e - -# Set TZ -if bashio::config.has_value 'TZ'; then - TIMEZONE=$(bashio::config 'TZ') - bashio::log.info "Setting timezone to $TIMEZONE" - ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime - echo "$TIMEZONE" >/etc/timezone -fi || (bashio::log.fatal "Error : $TIMEZONE not found. Here is a list of valid timezones : https://manpages.ubuntu.com/manpages/focal/man3/DateTime::TimeZone::Catalog.3pm.html") - -#bashio::log.info "Generating self signed certificate" -#/./proxy keygen -s -C proxy -c goproxy -# -#echo " " -# Start app -if [ -f /config/goproxy.txt ]; then - bashio::log.info "Starting app using the file in /addon_configs/xx-goproxy/goproxy.txt" - /./proxy @/config/goproxy.txt -else - bashio::log.warning "goproxy configuration file not existing, please create one in /addon_configs/xx-goproxy/goproxy.txt according to https://github.com/snail007/goproxy" - sleep 500 -fi diff --git a/goproxy/updater.json b/goproxy/updater.json deleted file mode 100644 index 588b272f6..000000000 --- a/goproxy/updater.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "last_update": "21-11-2023", - "paused": true, - "repository": "alexbelgium/hassio-addons", - "slug": "goproxy", - "source": "github", - "upstream_repo": "dani-garcia/goproxy_rs", - "upstream_version": "1.30.1" -} diff --git a/goproxy/CHANGELOG.md b/socks5-proxy/CHANGELOG.md similarity index 100% rename from goproxy/CHANGELOG.md rename to socks5-proxy/CHANGELOG.md diff --git a/goproxy/Dockerfile b/socks5-proxy/Dockerfile similarity index 88% rename from goproxy/Dockerfile rename to socks5-proxy/Dockerfile index 74dcca6e1..c6a457637 100644 --- a/goproxy/Dockerfile +++ b/socks5-proxy/Dockerfile @@ -19,14 +19,6 @@ ARG BUILD_VERSION FROM ${BUILD_FROM} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -ENV VERSION 14.1 - -RUN set -xe && \ - UNAME=$(uname -m) && if [ "$UNAME" = "x86_64" ]; then export PLATFORM=amd64 ; else export PLATFORM=arm64-v8 ; fi && \ - apk add tzdata && \ - wget https://github.com/snail007/goproxy/releases/download/v${VERSION}/proxy-linux-${PLATFORM}.tar.gz && \ - tar -xvf proxy-linux-${PLATFORM}.tar.gz - ################## # 2 Modify Image # ################## @@ -44,17 +36,14 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ COPY rootfs/ / # Modules -ARG MODULES="00-banner.sh 01-custom_script.sh" +ARG MODULES="00-global_var.sh" # Automatic modules download ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh" RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh # Manual apps -ENV PACKAGES="" \ - libpq5 \ - nginx \ - sqlite3" +ENV PACKAGES="" # Automatic apps & bashio ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh" @@ -72,7 +61,6 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh" RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh -# #WORKDIR / ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/ha_entrypoint.sh" ] diff --git a/socks5-proxy/README.md b/socks5-proxy/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/goproxy/apparmor.txt b/socks5-proxy/apparmor.txt similarity index 94% rename from goproxy/apparmor.txt rename to socks5-proxy/apparmor.txt index c71385591..095d3314c 100644 --- a/goproxy/apparmor.txt +++ b/socks5-proxy/apparmor.txt @@ -1,6 +1,6 @@ #include -profile goproxy_addon flags=(attach_disconnected,mediate_deleted) { +profile socks5-server_addon flags=(attach_disconnected,mediate_deleted) { #include capability, diff --git a/socks5-proxy/build.yaml b/socks5-proxy/build.yaml new file mode 100644 index 000000000..6221f828c --- /dev/null +++ b/socks5-proxy/build.yaml @@ -0,0 +1,7 @@ +--- +build_from: + aarch64: serjs/go-socks5-proxy:latest + amd64: serjs/go-socks5-proxy:latest + armv7: serjs/go-socks5-proxy:latest +codenotary: + signer: alexandrep.github@gmail.com diff --git a/socks5-proxy/config.json b/socks5-proxy/config.json new file mode 100644 index 000000000..2470dcf53 --- /dev/null +++ b/socks5-proxy/config.json @@ -0,0 +1,30 @@ +{ + "arch": [ + "aarch64", + "amd64", + "armv7" + ], + "codenotary": "alexandrep.github@gmail.com", + "description": "high performance proxy server", + "environment": { + "PROXY_PORT": "1080" + }, + "image": "ghcr.io/alexbelgium/socks5-server-{arch}", + "init": false, + "name": "Socks5 Server", + "ports": { + "1080/tcp": 1080 + }, + "ports_description": { + "1080/tcp": "Socks5 port" + }, + "schema": { + "PROXY_USER": "str", + "PROXY_PASSWORD": "str", + "ALLOWED_DEST_FQDN": "str?", + "ALLOWED_IPS": "str?" + }, + "slug": "socks5-server", + "url": "https://github.com/alexbelgium/hassio-addons/tree/master/socks5-server", + "version": "0.1" +} diff --git a/socks5-proxy/icon.png b/socks5-proxy/icon.png new file mode 100644 index 000000000..caa62a732 Binary files /dev/null and b/socks5-proxy/icon.png differ diff --git a/socks5-proxy/logo.png b/socks5-proxy/logo.png new file mode 100644 index 000000000..caa62a732 Binary files /dev/null and b/socks5-proxy/logo.png differ diff --git a/socks5-proxy/rootfs/etc/cont-init.d/99-run.sh b/socks5-proxy/rootfs/etc/cont-init.d/99-run.sh new file mode 100644 index 000000000..b4e596156 --- /dev/null +++ b/socks5-proxy/rootfs/etc/cont-init.d/99-run.sh @@ -0,0 +1,6 @@ +#!/command/with-contenv bashio +# shellcheck shell=bash +set -e + +# Start app +/./socks5 diff --git a/goproxy/stats.png b/socks5-proxy/stats.png similarity index 100% rename from goproxy/stats.png rename to socks5-proxy/stats.png diff --git a/socks5-proxy/updater.json b/socks5-proxy/updater.json new file mode 100644 index 000000000..c31d7844a --- /dev/null +++ b/socks5-proxy/updater.json @@ -0,0 +1,8 @@ +{ + "last_update": "21-11-2023", + "repository": "alexbelgium/hassio-addons", + "slug": "socks5-server", + "source": "dockerhub", + "upstream_repo": "serjs/go-socks5-proxy", + "upstream_version": "0.1" +}