N0x0n

joined 10 months ago
[–] [email protected] 12 points 3 days ago (4 children)

They mostly don't give a fuck about what you download. Just don't share the stuff forward.

That's a no go in the P2P community. Leeching is bad for the whole network and for everyone else. Especially on public torrents.

[–] [email protected] 10 points 4 days ago* (last edited 4 days ago)

Went 2 weeks there:

  • First week was only about diving and was probably the most beautiful thing I will ever see in my life.

  • Second week was about visiting the monuments and while they are astonishing cultural and historical bangers (except the pyramids which are impressive from the outside but just some dull stones in the inside) people living there (even those running restaurants or hotels) are invasive as fuck and not worthile your time...

However we also rentend an airbnb for 2 days and even if the room was clean it looked a bit gloomy but the guy was very nice and friendly we even ate a pizza with him and watched a local TV movie (some sharknado rip from their country XD). It was a way better experience than In a stared hotel with all commodities...

In general, going the tourist way is mostly a bad experience in every country.

[–] [email protected] 5 points 4 days ago* (last edited 4 days ago)

If you're running an Android phone, there's RethinkDNS which can block every requests except those explicitly allowed by yourself on the DNS level and firewall your traffic based on your rules.

It's very customizable but It's not that easy to get it right. You can even hook up your own wireguard tunnel and add block lists similar to uBlock.

If you want to dig deeper into the DNS blocking you can have a look at PCAPdroid which allows you to peek into wich app does what on the DNS level. While it works without rooting your phone, if you want to use it in combination with your VPN, you need root access.

[–] [email protected] 1 points 1 week ago

Thanks for the tip !! I will certainly give it a look, It's kinda annoying for my family members to always connect via wireguard.

For me it's fine though, I even route my traffic to ProtonVPN but my family is always nagging how they need to "do something" to get access to the hosted services or that it "doesn't work".

[–] [email protected] 5 points 1 week ago* (last edited 1 week ago) (6 children)

Except that everything is under your control and not managed by a third party, not much I think.

If this setup works for you and you're happy with it, just keep it going.

If you have time to spare, want to learn new things, tinkerer arround with network security, certificates, DNS, reverse proxy and, and, and... You can give it a try in a virtual machine and docker containers. But keep in mind that's not an easy way and involves a lot of personal time before you get a GOOD working self-hosted / exposed services.

I wouldn't recommend to open any port on your router except for a secured tunnel like wireguard and connect to your services through that tunnel. Opening port 443/80 on your router is bound to some heavy automated scanning and brute force by bots. If you don't have the necessary knowledge/tool/hardware, this is just going to put you at risk of ddos and remote attacks.

That's way something like cloudflare is populare, they most of the time take care of that nuisance and also why something like wireguard is popular among the selfhosting community.

[–] [email protected] 0 points 1 week ago* (last edited 1 week ago) (3 children)

Just out of curiosity, I haven't seen anyone recommend miniconda... Why so, is there something wrong I'm not aware of?

I'm no expert, but I totally feel you, python packages, dependencies and version matching is a real nightmare. Even with venv I had a hard time to make everything work flawlessly, especially on MacOS.

However, with miniconda everything was way easier to configure and worked as expected.

[–] [email protected] 1 points 1 week ago

people cared about the environment

It might be true for people, but I heard that's not true about their politics in general.

[–] [email protected] 16 points 1 week ago (2 children)

As long as the EU doesn't reinvent the wheel, why not? I mean if they are going to fork Linux and rewrite a EU-based linux OS, this would further divide the community and make issues and security a lot more wacky... Not sure this is a good idea.

[–] [email protected] 5 points 1 week ago* (last edited 1 week ago) (1 children)

They shouldn't bother paying customers... At least they could show some recommendations when your subscriptions is nearly at the end of it's terms.

"Hello dear customer, we are happy to have you on board, however your subscription is ending soon, if you're happy with our services here are some recommendations if you want to renew your subscription with us

  • Family pacakage 1 price
  • Package 2 price
  • Whatever 3 price

On contrary wouldn't you mind to give us any feedback on why you're leaving us or how/what we could improve?

https://proton.domain.org/

Thank you"

Something along the lines :/.

[–] [email protected] 11 points 1 week ago* (last edited 1 week ago)

Lutris + wineprefixes works great but most of the time it's harder to configure and needs some search around the web to get it right !

Non-steam games with proton on steam works like nearly every time without to much hassle (if supported) !!

If you're afraid of your account ban, create a dummy steam account only for your pirates games.

[–] [email protected] 1 points 1 week ago

Yeah, specially in the US where money rules the actual debate. If you don't have a few millions to spare on a fancy election parade... Don't even bother.

That's way politics is the war of the rich and why all multi billion dollar companies feel safe in the US.

[–] [email protected] 0 points 1 week ago* (last edited 1 week ago)

If you're tired of python's and venv issues, give miniconda a try. It solved most of my issues with dependencies and different python version in scripts.

It's probably a skill issue regarding to pip/pipx/venv... But miniconda really made everything easier.

 

Hello again :)

I'm not talking about a broken wg connection, everything works as expect through the CLI and systemctl.

But the NetworkManger GUI in Gnome shows my Wireguard connection as it was "not connected" and when I click on the switch it actually disconnects my wg interface.

Also when I try to edit my connection through

nmcli connection modify wg0 connection.autoconnect yes

and restart my wireguard connection with

systemctl restart wg-quick@wg0

It recreates a new wireguard interface.

While everything works as expected with the usual tools (wg-quick, systemctl...) the GUI seems "broken".

Someone else noticed or is this somehow related to my setup?

Debian 12 bookworm
Gnome 
nmcli tools 1.42.4
 

Solved

After interesting/insightful inputs from different users, here are the takeaways:

  • It doesn't have some critical or dangerous impact or implications when extracted
  • It contains the tared parent folder (see below for some neat tricks)
  • It only overwrites the owner/permission if ./ itself is included in the tar file as a directory.
  • Tarbombs are specially crafted tar archives with absolute paths / (by default (GNU) tar strips absolute paths and will throw a warning except if used with a special option –absolute-names or -P)
  • Interesting read: Path-traversal vulnerability (../)

Some neat trick I learned from the post

Temporarily created subshell with its own environment:

Let’s say you’re in the home directory that’s called /home/joe. You could go something like:

> (cd bin && pwd) && pwd
/home/joe/bin
/home/joe

source

Exclude parent folder and ./ ./file from tar

There are probably a lot of different ways to achieve that expected goal:

(cd mydir/ && tar -czvf mydir.tgz *)

find mydir/ -printf "%P\n" | tar -czf mytar.tgz --no-recursion -C mydir/ -T - source


~~The absolute path could overwrite my directory structure (tarbomb) source Will overwrite permission/owner to the current directory if extracted. source~~

I'm sorry if my question wasn't clear enough, I'm really doing my best to be as comprehensible as possible :/


Hi everyone !

I'm playing a bit around with tar to understand how it works under the hood. While poking around and searching through the web I couldn't find an actual answer, on what are the implication of ./ and ./file structure in the tar archive.

Output 1

sudo find ./testar -maxdepth 1 -type d,f -printf "%P\n" | sudo tar -czvf ./xtractar/tar1/testbackup1.tgz -C ./testar -T -
#output
> tar tf tar1/testbackup1.tgz 

text.tz
test
my
file.txt
.testzero
test01/
test01/never.xml
test01/file.exe
test01/file.tar
test01/files
test01/.testfiles
My test folder.txt

Output 2

sudo find ./testar -maxdepth 1 -type d,f  | sudo tar -czvf ./xtractar/tar2/testbackup2.tgz -C ./testar -T -
#output
>tar tf tar2/testbackup2.tgz

./testar/
./testar/text.tz
./testar/test
./testar/my
./testar/file.txt
./testar/.testzero
./testar/test01/
./testar/test01/never.xml
./testar/test01/file.exe
./testar/test01/file.tar
./testar/test01/files
./testar/test01/.testfiles
./testar/My test folder.txt
./testar/text.tz
./testar/test
./testar/my
./testar/file.txt
./testar/.testzero
./testar/test01/
./testar/test01/never.xml
./testar/test01/file.exe
./testar/test01/file.tar
./testar/test01/files
./testar/test01/.testfiles
./testar/My test folder.txt

The outputs are clearly different and if I extract them both the only difference I see is that the second outputs the parent folder. But reading here and here this is not a good solution? But nobody actually says why?

Has anyone a good explanation why the second way is bad practice? Or not recommended?

Thank you :)

 

Hello everyone !

I have no idea if I’m in the right community, because it’s a mix of hardware and some light code/command to extract the power consumption out of my old laptop. I need some assistance and if someone way more intelligent than me could check the code and give feedback :)

Important infos

  • 12 year old ASUS N76 laptop
  • Bare bone server running Debian 12
  • No battery (died long time ago)

Because I have no battery connected to my laptop It's impossible to use tools like lm-sensors, powerstat, powertop to output the wattage. But from the following ressource I can estimate the power based on the Energy.

time=1
declare T0=($(sudo cat /sys/class/powercap/*/energy_uj)); sleep $time; declare T1=($(sudo cat /sys/class/powercap/*/energy_uj))
for i in "${!T0[@]}"; do echo - | awk "{printf \"%.1f W\", $((${T1[i]}-${T0[i]})) / $time / 1e6 }" ; done

While It effectively outputs something, I'm not sure if I can rely on that to estimate the power consumption and if the code is actually correct? :/

Thanks :).

Edit:

My goal is to calculate the power drawn from my laptop without any electric appliance (maybe a worded my question/title wrong?). While It could be easily done with the top package or lm-sensors, this only work by measuring the battery discharge, which in my case is impossible because my laptop is directly connected to the outlet with his power cord (battery died years ago).

I dug a bit further through the web and found someone who asked the same question on superuser.com. While this gives a different reference point, nobody actually could answer the question.

This seems a bit harder than I though and is actually related to the /sys/class/powercap/*/energy_uj files and though someone could give me a bit more details on how this works and what the output actually shows.

This is also related to the power capping framework in the linux kernel? And as per the documentation this is representing the CPU packages current energy counter in micro joules.

So I came a bit closer in understanding how it works and what it does, even tough I’m still not sure what am I actually looking at :\ .

6
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
 

Edit:

Sorry for the bad posting :/. If someone is interested here is my actual post at https://lemmy.ml/post/12594067


Hello everyone !

I have no idea if I’m in the right community, because it’s a mix of hardware and some light code/command to extract the power consumption out of my old laptop. I need some assistance and if someone way more intelligent than me could check the code and give feedback :)

Important infos

  • 12 year old ASUS N76 laptop
  • Bare bone server running Debian 12
  • No battery (died long time ago)
  • Running a dozens docker containers.

Because I have no battery connected to my laptop I’m unable to use tools like lm-sensors, powerstat, powertop. But from the following ressource I can estimate the power based on the Energy.

time=1
declare T0=($(sudo cat /sys/class/powercap/*/energy_uj)); sleep $time; declare T1=($(sudo cat /sys/class/powercap/*/energy_uj))
for i in "${!T0[@]}"; do echo - | awk "{printf \"%.1f W\", $((${T1[i]}-${T0[i]})) / $time / 1e6 }" ; done

While It effectively outputs something, I'm not sure if I can rely on that to estimate the power consumption.

Thanks :).

 

Hi everyone :)

I'm slowly getting used on how to navigate and edit things in the terminal without leaving the keyboard and arrow keys. I'm getting faster and It improved my workflow in the terminal (Yeahhii).

ctrl + a e f b u k ...
alt + f b d ...

But yesterday I had such a bad experience while editing a backup bash script with nano. It took me like an hour to completely edit small changes like a caveman and always broke the editor when I used memory reflex terminal shortcuts.

This really pissed me... I know nano also has minimal/limited shortcuts but having to memorize and switch between different one for different purpose seems like a waste of time.

I think I tried emacs a few month ago but It didn't clicked. I didn't spend enough time though, tried it for a few minutes and deleted it afterwards. Maybe I should give it a second try?

I also gave Vim a try, but that session is still open and can't exit (😂 )! Vim seems rather to complex for my workflow, I'm just a self-taught poweruser making his way through linux. Am I wrong?

Isn't there something more "universal" ? That works everywhere I go the same? Something portable, so I can use it everywhere I go?

I'm very interested in everyone's thought, insight, personal experience and tip/tricks to avoid what happened yesterday !

Thanks !

21
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 

First of all, thank you to all the amazing things you do for the self-hoster, FOSS comunity ! We won't be able to have those shiny things without you ! I'm not a dev and have just played arround with python (and I know how most of you feel about it 🤫) so I have very limited knowledge regarding programming languages.

I know whats a low level language (C, C#, rust?), general scripting tools and even heard about assembly. And it always baffles me how all those coding lines rule and make our microchips communicate and understand each other, but that's another story ! This is about golang !


As a self-hoster enthousiast, when I'm looking at a github repository, I always check the programing language used, even though I have no idea if those integrate well with each other or if it's the best programming language for that kind of application.

And everytime I see golang, It makes me smile and have a feeling it's going to be a good application. I know it also depends on the programmer skills and creativity, but all my self-hosted Go apps works like a charm.

Traefik is the best example, I never had any issue or strange behavior, except for wrong configuration files on my side,

Or navidrome a music server compatible with subsonic, also written in go, is working great and fast AF !

Or Vikunja, the todo app... and many more !

I'm probably biased because I have no idea of how the programing realm works, but I have the feeling that Golang is a certificate for good working and fast applications. Just to bad it's backed/supported by google (uuhhg)

Feel free to debate and give me your personal opinion of the Go language, if my feelings are right or Am I just beeing silly :).

Thanks for reading through 👋

view more: ‹ prev next ›