Scrath

joined 2 years ago
[–] Scrath@lemmy.dbzer0.com 2 points 1 day ago

That's a good argument. I wasn't aware of the history of OpenWRT. For software I generally used the MIT license in the past, though I am now shying away from it given that it seems a bit too permissive in my opinion. I should probably research the GPL licenses a bit to figure out if one of those suits my needs.

[–] Scrath@lemmy.dbzer0.com 2 points 1 day ago

Yes, that is unfortunately true. Better some protection than none at all though

[–] Scrath@lemmy.dbzer0.com 5 points 1 day ago* (last edited 1 day ago) (5 children)

I have designed a couple of things and whenever I publish them I make them CC BY-NC-SA. I don't think I have designed anything people would be interested in selling but I explicitly do not want people to mass produce and sell my stuff. There's already more than enough plastic in the world and the popularity of 3D printers and the amount of gimmicky models I have seen are not helping that issue

[–] Scrath@lemmy.dbzer0.com 3 points 4 days ago

Depending on what router you use, setting up a VPN connection into your own home network may be the simplest solution and possibly also the most secure.

In germany at least, FritzBox seems to be the dominant router and they offer a very simple VPN setup which utilizes their own domain to initiate a connection.

I personally use a MikroTik router at home (still not sure if that was the best idea...) and they have a similar thing called Back To Home VPN. The Fritzbox gave me less trouble setting up though.

[–] Scrath@lemmy.dbzer0.com 1 points 6 days ago (1 children)

I feel like Python is sometimes too powerful in terms of what you can achieve with few lines of code. It tends to have lines that do a lot of things at once and therefore become very hard to understand despite not having a lot of code at the surface.

In my opinion it is very good for stuff like data analysis and scripting test setups, but (with my admittedly limited experience in the area) I dislike using it for larger applications. Because it is a scripting language and not compiled, I have run into errors that a compiled language would have detected before even starting. Meanwhile python was happy to run my program until it unfortunately branched into the defective path...

If you want to build stuff quickly it is incredibly what you can achieve with it though.

[–] Scrath@lemmy.dbzer0.com 7 points 1 week ago

For phone <-> PC I use localsend. If I do PC to PC, possibly even large amounts of files or large files in general I put them on a network drive specifically intended for that purpose

[–] Scrath@lemmy.dbzer0.com 1 points 1 week ago

I lost maybe 100-200 euros opening lootboxes in Counterstrike. Not at once but maybe 20 euros at a time. At some point I realized it didn't make any sense to continue buying them and I haven't spent money on microtransactions since.

[–] Scrath@lemmy.dbzer0.com 1 points 1 week ago

I am aware of the compose key, I was just never a fan of it. I have it set up to replicate my previous autohotkey script on my laptop but I found that in some rare cases, pressing the next key for a word I am typing would change the letter from what I intended to something else.

Using the compose key like 'compose + " a' also feels unintuitive to me and introduces one more key for me to press, though I could likely get used to it with some effort.

[–] Scrath@lemmy.dbzer0.com 2 points 1 week ago (3 children)

I also use wayland on both my laptop and desktop.

The only issue I have is the lack of some utility which I can use to type my german umlauts using macros. On windows I had an autohotkey script so that alt + a would become ä and so on.

I've tried a couple programs that work on wayland, but without success in getting them to work how I wanted. The last time I checked there were a couple promising candidates left that are explicitly not working on Wayland though.

[–] Scrath@lemmy.dbzer0.com 8 points 2 weeks ago* (last edited 2 weeks ago)

Every time I hear politicians advocating for more children I keep thinking "you want to put even more people on this earth to use up its resources?"

Surely having a few less humans around would be a good thing for the climate.

[–] Scrath@lemmy.dbzer0.com 2 points 3 weeks ago

I used to be on plex for similar reasons.

Remote login is still a hassle of course. I work around it with a VPN but that causes issues sometimes.

Plex Amp went great for a while for me until it suddenly didn't. The app got incredibly laggy on my phone when I was playing playlists of a 1000 songs or more. I switched to navidrome + Symfonium as an alternative and set up remote access with a cloudflare tunnel.

[–] Scrath@lemmy.dbzer0.com 6 points 3 weeks ago

I like to think I got my money out of mine as well, even though I only used it for like a year or two before switching to jellyfin.

 

Hello everyone, I recently tried switching my docker torrent client setup from haugene/transmission-openvpn to linuxserver/qbittorrent with gluetun for my VPN.

I have gluetun set up to use port forwarding with ProtonVPN which assigns a random port on every connection. Gluetun provides a VPN_PORT_FORWARDING_UP_COMMAND which can be used in this scenario to update the port used by qbittorrent. While I had issues with the example command in the gluetun wiki to do this, I eventually managed using a bash script I found in another forum.

My issue now is that my server shuts down for the night to reduce noise and after restarting, even though I have the container startup order set up, qbittorrent is no longer reachable on its webinterface. The logs do not indicate any issue though.

As far as I can tell, the stack as I have set it up is extremely finnicky in terms of startup order and time. If I start gluetun first and then wait too long before starting qbit, the port update script will fail because there is obviously no target for it. If qbit is up and running before gluetun is done, I typically can't access its webinterface for some reason and the network interface used by gluetun will set itself to loopback.

The result of this is that basically every morning I have to start and restart the containers in the stack a couple of times until I can access the interface and ensure that the port and network interface of qbit are configured correctly.

If anyone has a similar setup working that they could share or maybe another solution to my current issue that would be great. Thanks.

This is my docker-compose stack for the new setup

version: '3'
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    ports:
      - 8080:8080 # qbittorrent webinterface
      # - 6881:6881 # qbittorrent, only needed without port-forwarding
    environment:
      - VPN_SERVICE_PROVIDER=protonvpn
      - OPENVPN_USER=${OPENVPN_USERNAME}
      - OPENVPN_PASSWORD=${OPENVPN_PW}
      - SERVER_COUNTRIES=Switzerland
      - VPN_PORT_FORWARDING=on
      - PORT_FORWARD_ONLY=on
      - TZ=Europe/Berlin
      # From gluetun wiki: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md
      - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'sh /gluetun/update-port.sh "{{PORTS}}"'
      - VPN_PORT_FORWARDING_DOWN_COMMAND=/bin/sh -c 'echo "Execution port forwarding down command" && wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":0,\"current_network_interface\":\"lo\"}" http://127.0.0.1:8080/api/v2/app/setPreferences'
      - QBIT_ADDRESS=http://localhost:8080/
      - QBIT_USERNAME=${QBIT_USER}
      - QBIT_PASSWORD=${QBIT_PW}
    volumes:
      - /mnt/truenas/qbittorrent/update_port.sh:/gluetun/update-port.sh
    labels:
      - "com.centurylinklabs.watchtower.enable=true" # Auto update using watchtower

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    network_mode: "service:gluetun"
    depends_on:
      - gluetun
        # condition: service_healthy
        # restart: true
    volumes:
      - /home/poseidon/qbittorrent:/config
      - /mnt/truenas/qbittorrent:/downloads
    # ports:
    #   - 8080:8080
    #   - 6881:6881
    #   - 6881:6881/udp
    restart: unless-stopped

And this is the script I use for updating the qbittorrent ports

#!/bin/sh
# update-port.sh
port="$1"
retries="${UPDATE_PORT_RETRIES:-5}"
interval="${UPDATE_PORT_RETRY_INTERVAL:-10}"

echo "Attempting to update qBittorrent port to $port..."

for i in $(seq 1 "$retries"); do
  response=$(wget --quiet --save-cookies=/tmp/cookies.txt --keep-session-cookies \
                  --post-data="username=$QBIT_USERNAME&password=$QBIT_PASSWORD" \
                  --header="Referer: $QBIT_ADDRESS" \
                  "$QBIT_ADDRESS/api/v2/auth/login" -O -)

  if [ "$response" = "Ok." ]; then
    break
  fi

  echo "Login attempt $i/$retries failed. Retrying in $interval seconds..."

  sleep "$interval"
done

set -e

if [ "$response" != "Ok." ]; then
    echo "Unable to log in to qBittorrent."
    rm -f /tmp/cookies.txt

    exit 1
fi

wget --quiet --load-cookies=/tmp/cookies.txt \
     --post-data="json={\"listen_port\": $port, \"current_network_interface\":\"$VPN_INTERFACE\", ,\"random_port\":false,\"upnp\":false}" \
     "$QBIT_ADDRESS/api/v2/app/setPreferences" -O /dev/null

rm -f /tmp/cookies.txt

echo "qBittorrent port updated successfully to $port."

Update

After updating my stack based on the recommendation from hyphen612 it has been running flawlessly for a few days. This is my new docker-compose file. The extra script I used before for updating the port has been retired.

version: '3'
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    ports:
      - 8080:8080 # qbittorrent
      # - 6881:6881 # deluge or qbittorrent, only needed without port-forwarding
    environment:
      - VPN_SERVICE_PROVIDER=protonvpn
      - OPENVPN_USER=${OPENVPN_USERNAME}
      - OPENVPN_PASSWORD=${OPENVPN_PW}
      - SERVER_COUNTRIES=Switzerland
      - VPN_PORT_FORWARDING=on
      - PORT_FORWARD_ONLY=on
      - IPV6=off
      - TZ=Europe/Berlin
      - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1'
      - HEALTH_SUCCESS_WAIT_DURATION=20s
      - HEALTH_TARGET_ADDRESSES='1.1.1.1:443'
    healthcheck:
      test: ["CMD", "/gluetun-entrypoint", "healthcheck"]
      interval: 10s
      timeout: 10s
      start_period: 20s
      retries: 10 #has internal fix mechanism
    labels:
      - "com.centurylinklabs.watchtower.enable=true" # Auto update using watchtower

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    network_mode: "service:gluetun"
    depends_on:
      gluetun:
        condition: service_healthy
        # restart: true
    volumes:
      - /home/poseidon/qbittorrent:/config
      - /mnt/truenas/qbittorrent:/downloads
    restart: unless-stopped

Update 2

The issue with qbittorrent not being reachable despite the container being healthy did not go away with the previous update. What finally fixed the issue for me was changing the tag of the container image. I am now using the lscr.io/linuxserver/qbittorrent:libtorrentv1 image instead and that seems to work so far.

 

Hello everyone, I am currently looking for a software solution to use my home server as a DLNA renderer which can output audio to my stereo amplifier.

The only solution I found was called gmrender-resurrect which seems like it would do exactly what I want but I was unable to get a docker container of it working. While I was able to find and connect to the DLNA Renderer, playback would fail every time and I was unable to get any information from the logs regarding why.

Do any of you know another solution to stream audio from my phone to my server (I am using Symfonium on the phone side)? Ideally it would be something I can deploy as a docker container on my server.

Thanks.

 

Hello everyone, I am currently trying to set up a kmonad config file to replace the autohotkey script I used on windows. My goal is simply to use the right alt key in combination with a,o,u and so on to type german umlaut characters like ä,ö,ü, etc.

So far I am having trouble even getting kmonad to run the config. I guess I probably misunderstand how this is supposed to work significantly. My initial config file was generated by ChatGPT since I had no idea where to even start.

This is my current config file

(defcfg
  input  (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
  output (uinput-sink "kmonad_keyboard")
  fallthrough true
  allow-cmd true
)

(defsrc
  ralt a o u s lsft
)

(deflayer german
  ralt-a "ä"
  ralt-o "ö"
  ralt-u "ü"
  ralt-s "ß"
  ralt-shift-a "Ä"
  ralt-shift-o "Ö"
  ralt-shift-u "Ü"
)

Any help would be appreciated.

45
submitted 2 years ago* (last edited 2 years ago) by Scrath@lemmy.dbzer0.com to c/electronics@discuss.tchncs.de
 

Hello everyone, I recently built a small distribution board to distribute 5V to multiple components for use in a robotics project. I made each output switchable with an individual switch and an LED to indicate the current state. When I went to test it using a lab power supply I noticed that the LEDs would start flickering weirdly when I turned them off and on again.

https://imgur.com/a/zaSCUby

As it turns out, the LEDs, which I found in my dads old parts in a bag labeled TLBO 5410, are apparently blinking LEDs. I found a datasheet for TLBR5410 LEDs which seem pretty much identical to what I have accidentally used.

Apparently these LEDs are made to operate directly from a 5V supply without an additional current limiting resistor (it is already built in) and are made to continuously blink at a frequency of 3Hz.

Because I thought I was using standard LEDs I added a series resistor causing them to behave weirdly due to low voltage. For comparison, this is how they are supposed to act: https://imgur.com/a/fXlcEDs

 

Hello everyone, I have another question regarding reverse-proxying again, specifically for the linuxserver.io jellyfin image.

On the dockerhub page for this image there are 4 ports listed which should be exposed:

  • 8096 for the HTTP Web UI
  • 8920 for the HTTPS Web UI
  • 7359/udp for autodiscovery of jellyfin from clients
  • 1900/udp for service discovery from DLNA and clients

Additionally there is also an environment variable JELLYFIN_PublishedServerUrl which is for "Setting the autodiscovery response domain or IP address". I currently have that set to my subdomain https://jellyfin.mydomain.com though I am not sure if that is correct.

I already have a reverse-proxy set up allowing me to access my servers webinterface under https://jellyfin.mydomain.com without exposing the https port on the container. What I am unsure about now however, is what to do with the two ports for UDP traffic.

By my understanding, a reverse-proxy will only forward traffic which comes to the ports 80 for http and 443 for https. Those are also the only ports my reverse-proxy container has exposed alongside the management interface. As such the 2 udp ports will not be reachable under my jellyfin domain.

How can I change this or is this even an issue?

10
submitted 2 years ago* (last edited 2 years ago) by Scrath@lemmy.dbzer0.com to c/selfhosted@lemmy.world
 

Hello, I have a question regarding the usage of a reverse-proxy which is part of a docker network.

I currently use Nginx Proxy Manager as a reverse-proxy for all my services hosted in docker. This works great since I can simply forward using each containers name. I have some services however (e.g. homeassistant) which are hosted separately in a VM or using docker on another device.

Is it possible to use the same reverse-proxy for those services as well? I haven't found a way to forward to hosts outside of the proxies docker network (except for using the host network setting which I would like to avoid)

view more: next ›