mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-07 01:18:16 +02:00
clean
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
## v0.0.3 (24-02-2024)
|
|
||||||
- Update to latest version from serjs/go-socks5-proxy
|
|
||||||
- Initial build
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
#============================#
|
|
||||||
# ALEXBELGIUM'S DOCKERFILE #
|
|
||||||
#============================#
|
|
||||||
# _.------.
|
|
||||||
# _.-` ('>.-`"""-.
|
|
||||||
# '.--'` _'` _ .--.)
|
|
||||||
# -' '-.-';` `
|
|
||||||
# ' - _.' ``'--.
|
|
||||||
# '---` .-'""`
|
|
||||||
# /`
|
|
||||||
#=== Home Assistant Addon ===#
|
|
||||||
|
|
||||||
#################
|
|
||||||
# 1 Build Image #
|
|
||||||
#################
|
|
||||||
|
|
||||||
ARG GOLANG_VERSION="1.19.1"
|
|
||||||
|
|
||||||
FROM golang:$GOLANG_VERSION-alpine as builder
|
|
||||||
RUN apk --no-cache add tzdata
|
|
||||||
WORKDIR /go/src/github.com/serjs/socks5
|
|
||||||
COPY . .
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5 || true
|
|
||||||
|
|
||||||
ARG BUILD_VERSION
|
|
||||||
FROM ghcr.io/hassio-addons/base:15.0.7
|
|
||||||
COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
|
|
||||||
|
|
||||||
##################
|
|
||||||
# 2 Modify Image #
|
|
||||||
##################
|
|
||||||
|
|
||||||
# Set S6 wait time
|
|
||||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
|
||||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
|
||||||
S6_SERVICES_GRACETIME=0
|
|
||||||
|
|
||||||
##################
|
|
||||||
# 3 Install apps #
|
|
||||||
##################
|
|
||||||
|
|
||||||
# Add rootfs
|
|
||||||
COPY rootfs/ /
|
|
||||||
|
|
||||||
# Modules
|
|
||||||
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=""
|
|
||||||
|
|
||||||
# Automatic apps & bashio
|
|
||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
|
||||||
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
|
|
||||||
|
|
||||||
################
|
|
||||||
# 4 Entrypoint #
|
|
||||||
################
|
|
||||||
|
|
||||||
# Add entrypoint
|
|
||||||
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
|
||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
|
||||||
|
|
||||||
# Entrypoint modifications
|
|
||||||
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" ]
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
############
|
|
||||||
# 5 Labels #
|
|
||||||
############
|
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG BUILD_DESCRIPTION
|
|
||||||
ARG BUILD_NAME
|
|
||||||
ARG BUILD_REF
|
|
||||||
ARG BUILD_REPOSITORY
|
|
||||||
ARG BUILD_VERSION
|
|
||||||
LABEL \
|
|
||||||
io.hass.name="${BUILD_NAME}" \
|
|
||||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
|
||||||
io.hass.arch="${BUILD_ARCH}" \
|
|
||||||
io.hass.type="addon" \
|
|
||||||
io.hass.version=${BUILD_VERSION} \
|
|
||||||
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
|
||||||
org.opencontainers.image.title="${BUILD_NAME}" \
|
|
||||||
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
|
||||||
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
|
||||||
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
|
||||||
org.opencontainers.image.licenses="MIT" \
|
|
||||||
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
|
||||||
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
|
||||||
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
|
||||||
org.opencontainers.image.created=${BUILD_DATE} \
|
|
||||||
org.opencontainers.image.revision=${BUILD_REF} \
|
|
||||||
org.opencontainers.image.version=${BUILD_VERSION}
|
|
||||||
|
|
||||||
#################
|
|
||||||
# 6 Healthcheck #
|
|
||||||
#################
|
|
||||||
|
|
||||||
ENV HEALTH_PORT="80" \
|
|
||||||
HEALTH_URL=""
|
|
||||||
HEALTHCHECK \
|
|
||||||
--interval=5s \
|
|
||||||
--retries=5 \
|
|
||||||
--start-period=30s \
|
|
||||||
--timeout=25s \
|
|
||||||
CMD curl --fail "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
#include <tunables/global>
|
|
||||||
|
|
||||||
profile socks5-server_addon flags=(attach_disconnected,mediate_deleted) {
|
|
||||||
#include <abstractions/base>
|
|
||||||
|
|
||||||
capability,
|
|
||||||
file,
|
|
||||||
signal,
|
|
||||||
mount,
|
|
||||||
umount,
|
|
||||||
remount,
|
|
||||||
network udp,
|
|
||||||
network tcp,
|
|
||||||
network dgram,
|
|
||||||
network stream,
|
|
||||||
network inet,
|
|
||||||
network inet6,
|
|
||||||
network netlink raw,
|
|
||||||
network unix dgram,
|
|
||||||
|
|
||||||
capability setgid,
|
|
||||||
capability setuid,
|
|
||||||
capability sys_admin,
|
|
||||||
capability dac_read_search,
|
|
||||||
# capability dac_override,
|
|
||||||
# capability sys_rawio,
|
|
||||||
|
|
||||||
# S6-Overlay
|
|
||||||
/init ix,
|
|
||||||
/run/{s6,s6-rc*,service}/** ix,
|
|
||||||
/package/** ix,
|
|
||||||
/command/** ix,
|
|
||||||
/run/{,**} rwk,
|
|
||||||
/dev/tty rw,
|
|
||||||
/bin/** ix,
|
|
||||||
/usr/bin/** ix,
|
|
||||||
/usr/lib/bashio/** ix,
|
|
||||||
/etc/s6/** rix,
|
|
||||||
/run/s6/** rix,
|
|
||||||
/etc/services.d/** rwix,
|
|
||||||
/etc/cont-init.d/** rwix,
|
|
||||||
/etc/cont-finish.d/** rwix,
|
|
||||||
/init rix,
|
|
||||||
/var/run/** mrwkl,
|
|
||||||
/var/run/ mrwkl,
|
|
||||||
/dev/i2c-1 mrwkl,
|
|
||||||
# Files required
|
|
||||||
/dev/fuse mrwkl,
|
|
||||||
/dev/sda1 mrwkl,
|
|
||||||
/dev/sdb1 mrwkl,
|
|
||||||
/dev/nvme0 mrwkl,
|
|
||||||
/dev/nvme1 mrwkl,
|
|
||||||
/dev/mmcblk0p1 mrwkl,
|
|
||||||
/dev/* mrwkl,
|
|
||||||
/tmp/** mrkwl,
|
|
||||||
|
|
||||||
# Data access
|
|
||||||
/data/** rw,
|
|
||||||
|
|
||||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
|
||||||
ptrace (trace,read) peer=docker-default,
|
|
||||||
|
|
||||||
# docker daemon confinement requires explict allow rule for signal
|
|
||||||
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"arch": [
|
|
||||||
"aarch64",
|
|
||||||
"amd64",
|
|
||||||
"armv7"
|
|
||||||
],
|
|
||||||
"codenotary": "alexandrep.github@gmail.com",
|
|
||||||
"description": "Simple socks5 server using go-socks5",
|
|
||||||
"environment": {
|
|
||||||
"PROXY_PORT": "1080"
|
|
||||||
},
|
|
||||||
"init": false,
|
|
||||||
"name": "zzz_Under Development not working",
|
|
||||||
"ports": {
|
|
||||||
"1080/tcp": 1080
|
|
||||||
},
|
|
||||||
"ports_description": {
|
|
||||||
"1080/tcp": "Socks5 port"
|
|
||||||
},
|
|
||||||
"schema": {
|
|
||||||
"ALLOWED_DEST_FQDN": "str?",
|
|
||||||
"ALLOWED_IPS": "str?",
|
|
||||||
"PROXY_PASSWORD": "str",
|
|
||||||
"PROXY_USER": "str"
|
|
||||||
},
|
|
||||||
"slug": "socks5-server",
|
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/socks5-server",
|
|
||||||
"version": "empty"
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,6 +0,0 @@
|
|||||||
#!/command/with-contenv bashio
|
|
||||||
# shellcheck shell=bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Start app
|
|
||||||
/./socks5
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"last_update": "24-02-2024",
|
|
||||||
"repository": "alexbelgium/hassio-addons",
|
|
||||||
"slug": "socks5-server",
|
|
||||||
"source": "dockerhub",
|
|
||||||
"upstream_repo": "serjs/go-socks5-proxy",
|
|
||||||
"upstream_version": "v0.0.3"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user