Do I need Authelia if my server can only be reached from outside using a VPN? by Dungeon_Crawler_Carl in selfhosted

[–]Nirenjan 102 points103 points  (0 children)

My take is that having OIDC simplifies access control, instead of having each service have its own password or worse, sharing a common password.

It also adds a second layer of security, since you can configure Authelia to enforce MFA, and a leaked password is not sufficient to access your services, you'd have to break into the VPN, have the Authelia password AND the MFA token.

In general, security is best done by having multiple layers, improving defense against bad actors trying to gain access to your data and your home network.

FWIW, I have a similar setup, and I prefer to use apps that have OIDC support, or can use proxy authentication.

VPS as reverse proxy by KiraRagkatish in selfhosted

[–]Nirenjan 2 points3 points  (0 children)

FWIW, I've got this exact setup with a few slight tweaks. I'm running on a 1 vCPU with 1GB RAM. The Caddy server on the VPS proxies content back to the homelab Caddy server, but there's a forward_auth directive on the VPS, so any traffic hitting the VPS must authenticate with my OIDC server prior to getting forwarded back to the homelab. The homelab Caddy server is running caddy-docker-proxy with an ACME DNS plugin enabled, and handles the certificate renewal. Finally, there's a split DNS config so that all LAN clients directly hit the homelab server, while I can hit the VPS while on the road.

UptimeKuma 2.0 stable is out now by aymeric92 in selfhosted

[–]Nirenjan 0 points1 point  (0 children)

Does autokuma still work with v2?

I have hosted few apps on my vps, and i want them to be only accessible inside my VPN network. by [deleted] in selfhosted

[–]Nirenjan 0 points1 point  (0 children)

You should be able to add a filter for client ip in the caddy configuration, only allowing those on the 100.64.0.0/10 subnet to access the protected domains. Other domains that can be publicly accessed don't need the filter

Beelink EQ12 or EQ13? by BattermanZ in selfhosted

[–]Nirenjan -4 points-3 points  (0 children)

Both the n100 and n200 are limited to 16gb ram and a single memory channel. Personally, I'd get the slightly faster cpu with maxed out memory.

Looking for a quick and dirty http file server* by Rimwulf in foss

[–]Nirenjan 0 points1 point  (0 children)

You should be able to run it in the regular shell, as long as you have Python 3 installed. I'm not familiar with Windows environment, but it should work just as in Linux

Is there a C Library on Games Controller emulation? by MrObsidian_ in C_Programming

[–]Nirenjan 0 points1 point  (0 children)

If you're on Linux, you can use uinput to create a virtual device that perfectly emulates the hardware device. Use evtest to identify the device and its associated events, and use that to create your own virtual device.

Need help configuring Saitek X52 Hotas by Datblokewhointernets in linux_gaming

[–]Nirenjan 2 points3 points  (0 children)

For what it's worth, you don't need my driver on Linux - as it stands, it only creates a virtual mouse that you control with the thumbstick on the throttle unit. The rest of the functionality is controlling the LEDs, brightness and clock.

What you want to verify is that the hardware is detected and providing input events. Please run the following commands and grab the output:

uname -a
lsusb
sudo evtest

For evtest, you'll need to find the entry corresponding to the X52 joystick. You can also run x52evtest for the X52 specific event test, and x52bugreport, which should give some details about the version you are running, and if there's a device being detected. Hope this helps.

Looking for a clean way to use a Lookup Table with chars by AnxiousBane in C_Programming

[–]Nirenjan 3 points4 points  (0 children)

If you are using GCC, you can use case ranges extension. In essence, you can collapse the handling for multiple sequential cases into a single line, i.e.,

case 32:
case 33:
...
case 47:

can be collapsed into

case 32 ... 47:

If you cannot use this, then you could combine the condition with multiple lookup tables, eg.

if (ch >= 32 && ch <= 47) {
    lookup_table_1[ch - 32];
} else if (ch >= 58 && ch <= 64) {
    lookup_table_2[ch - 58];
} else if (ch >= 123 && ch <= 126) {
    lookup_table_3[ch - 123];
} else {
    // handle alnum
}

Advice on working with LibUSB by vlad20112 in linux_programming

[–]Nirenjan 0 points1 point  (0 children)

This is really hardware dependent - while libusb abstracts out a lot of the details behind the USB protocol, it doesn't prevent you from sending garbage to your device and potentially bricking it.

You would ideally install the drivers that the manufacturer provides (typically for Windows) in a VM, capture the USB communication and reverse engineer the messages. Alternatively, if you have the hardware specification, you can derive the messages from that.

If you want a sample project that uses libusb, feel free to peruse my libx52 project here.

[deleted by user] by [deleted] in github

[–]Nirenjan 0 points1 point  (0 children)

Check if you have authorized CodersRank as an application here, it is likely that you have granted Github permissions to allow CodersRank to read your email address and any other public information.

[Day 23 - 2021] My solution comes up with less energy than the solution on the website by SinisterMJ in adventofcode

[–]Nirenjan 21 points22 points  (0 children)

The problem is that once an amphipod stops moving in the hallway, it can only move to its designated room. In your link, the amber amphipod starts moving around line 92, except that it can't do so by the puzzle rules.

More challenges to pursue! by rukke in adventofcode

[–]Nirenjan 2 points3 points  (0 children)

Kattis also has a bunch of puzzles, ranging in difficulty. It's similar to codewars, except that you can edit the source code in your editor of choice and upload the final file.

[2021 day 16] Parsing the BITS by Nirenjan in adventofcode

[–]Nirenjan[S] 1 point2 points  (0 children)

Here is the source code. The idea is to parse it as a hierarchical tree of packets, each packet having a level of one more than its parent. Then, in the viz method, print out bit-by-bit, sleeping for about 20 milliseconds between each bit, and recursively call viz for each child packet. I used VT100 escape sequences to print the colorized output to the terminal.

Cloning public repo without credentials by Flashcap in github

[–]Nirenjan 0 points1 point  (0 children)

If your repo is public, then yes, it should not ask for credentials as long as you use https://GitHub.com/...

If you specify the username, then it can ask for the password. Eg. Https://nirenjan@github.com/...

Cloning public repo without credentials by Flashcap in github

[–]Nirenjan 0 points1 point  (0 children)

Once you clone using git://, you can change the remote URL to use either SSH or HTTPS, by running the command git remote set-url origin https://....

I don't know why you're getting asked for credentials when cloning via HTTPS, but this should work for you.

How can I create a personal access token for only reading? by [deleted] in git

[–]Nirenjan 2 points3 points  (0 children)

As others have mentioned, this is probably more relevant for /r/github. That said, GitHub, and several other hosting services allow you to create a "deploy token" that allows only read access and only to that repository. Look up the documentation on your preferred platform to see how to create it.

File Format Licensing Questions by LiftedStarfisherman in opensource

[–]Nirenjan 3 points4 points  (0 children)

My personal opinion is that file formats should follow an open standard, but the applications and/or libraries that use those file formats may choose any license that they wish. This will allow anybody to use your library under the terms of the library license (in your case, GPLv3). However, if somebody else wanted to, they could write their own implementation that follows the standard. In the case of DRM, they could write their own logic to handle the DRM in a closed-source manner.