HNHacker News
TopNewBestAskShowJobs

momothereal

678 karma · joined November 24, 2017

submissionscomments
momothereal··on Ask HN: What are your favorite examples of elegant software?
Damn, I was completely off!
momothereal··on Ask HN: What are your favorite examples of elegant software?
Team Fortress, Counter Strike, and Tycoon games.
momothereal··on A userspace WireGuard client that exposes itself as a proxy
Sure, essentially it's a TCP and UDP server that:

- receives connections and assigns a random internal port for it

- wraps the data packets in a transport(TCP/UDP) packet that's routed from the internal port to the remote

- wraps the transport in an IP packet that's routed from the address assigned the the proxy, and to the remote WireGuard address

- wraps that with WireGuard's protocol (encryption)

- sends off the encrypted packet to the public WireGuard UDP endpoint

The packet-wrapping and TCP state machine is implemented using smoltcp in Rust, which is similar to netstack in Go

The WireGuard encapsulation and state machine is implemented with boringtun, Cloudflare's implementation of the WireGuard client in Rust.

I do have a more thorough architecture explanation in the Readme: https://github.com/aramperes/onetun#architecture

momothereal··on A userspace WireGuard client that exposes itself as a proxy
Plug for my own similar project: https://github.com/aramperes/onetun

Though admittedly, mine doesn't have SOCKS support, and the code is not as lean as yours!

momothereal··on GitHub incident 2022-03-23
Yes: https://news.ycombinator.com/item?id=30767635
momothereal··on Apple M1 Ultra
I think you are forgetting the context of my replies. I'm not saying it's unreasonable to have to upgrade discontinued hardware, even if you have to do it all at once. My take is that it's not too different from having to replace a Mac when the new generation comes in (which is usually every ~5 years for Apple, not too far from my own system's lifetime). Being able to upgrade individual parts through generations is a pipe dream.

Also, we must have a different interpretation of "discontinued", because DDR3 and LGA1150 were still produced, sold, and dominated sales for way long after I bought that system. At the time (and for the next 1-2 years), consumer DDR4 was a luxury component that most no existing hardware supported.

momothereal··on Apple M1 Ultra
Yes, they entered the market around those years, but what does that change? DDR3 and LGA1150 were not deemed "legacy" the day DDR4 and LGA1151 motherboards entered the market. They were 2-3x the price, and DDR3 dominated RAM sales until at least 2017. In fact, the reason DDR4 took so long to enter the market was incompatibility with existing hardware, and higher costs to upgrade. [1] I didn't go out of my way to buy "legacy hardware" because they weren't, at the time.

Point being, PC-building makes it easier to replace and repair individual components, but in time, upgrading to newer generations means spending over 50% of the original cost on motherboard, CPU, PSU, RAM. Not too different than dropping $3K on a new Mac.

[1] https://web.archive.org/web/20101219085440/http://www.xbitla...

momothereal··on Apple M1 Ultra
I believed that until I realized I couldn't individually upgrade my CPU or RAM because I have a mobo with LGA1150 socket and only supports DDR3 (and it's only 6 years old).

So eventually you still have to "replace everything" to upgrade a PC.

momothereal··on Show HN: Full text search on 630M US court cases
Sounds like you're resource-starving it if it crawls at 100k. Either that or ES is perhaps not your bottleneck?
momothereal··on YSFlight – A free flight simulator where anything is possible
The polygon-based graphics remind me of Need for Madness! I played it in elementary school every day between 2008-2012. No multiplayer until a few years later though.

http://needformadness.com/

momothereal··on Can I have a smaller Prometheus
To be precise it was the other way around. OpenMetrics is a standardization effort for the format Prometheus made up.

However Prometheus was designed before JSON was standardized itself, so I'm just glad they didn't choose XML!

momothereal··on Can I have a smaller Prometheus
Ah ok, I see what you mean.

The other commenters have pointed out that it _is_ based on another open standard, but admittedly one less common than say, JSON. So you'll generally have to implement your own metrics producer or use a client library, that's true.

However it's also a dead simple format and you can probably implement it with a for-loop or a shell script.

momothereal··on Can I have a smaller Prometheus
> AFAIK, it isn't even designed to consume metrics other than from apps linked to its client library.

Could you elaborate? I use Prometheus to scrape from an HTTP endpoint in various Pods in Kubernetes, so the service discovery is pretty useful to me.

I could see the Kubernetes & the other SDs split out of the core binary if default size is really an issue. Or are you talking about something else?

momothereal··on Ransomware-resistant backups with duplicity and AWS S3
Can you still configure object retention when they are locked? i.e. automatically delete objects after X days.
momothereal··on Microsoft posts its own teardown and repair video for the Surface Laptop SE
Many schools and school districts have technicians to repair hardware like projectors and computers. When I was in high-school (10 years ago), we were pretty early in the laptop-for-every-student transition, and there were 1-2 part-time technicians who would repair laptops all day long.
momothereal··on Ask HN: What are your new years resolutions?
If you're interested in chess programming, this is a great resource: https://www.chessprogramming.org/Main_Page
momothereal··on MultiMC – Clarify WSL error messages #3165
What's the story here? Just sounds like a bunch of edgy teenagers working on a Minecraft launcher...
momothereal··on Hetzner now provides IPv6 only dedicated servers
It's about having multiple continuous ranges of addresses.

Think of it in IPv4 terms, it's like having the range 192.168.0.0 to 192.168.0.255 (192.168.0.0/24) assigned to your host. 256 addresses should be plenty of addresses, but you can't cleanly segment them into multiple ranges, like you could with 192.168.0.0/16: because you can have 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24.

By having multiple, complete blocks of /24, you can easily assign them to different classes of IP interfaces on your host.

momothereal··on Bob Dole and Jack Kemp (1996)
Includes a pecan cookie recipe from Dole's wife: http://www.dolekemp96.org/about/cookies/cookies.html
momothereal··on Consider LibreSSL as default OpenSSL provider again
I think it was meant to be a reply for: https://news.ycombinator.com/item?id=29265760
momothereal··on Show HN: Onetun – Access your WireGuard network from anywhere
Yup! This is how onetun works as well (but :%s/Netstack/smoltcp/g in Rust)
momothereal··on Show HN: Onetun – Access your WireGuard network from anywhere
Yup, it's a play on word with "won ton" and "one tun[nel]" ;)

I have some illustrator and designer friends, I'll see if they want to cook up something!

momothereal··on Show HN: Onetun – Access your WireGuard network from anywhere
Thanks for the links, I'll have to take some inspiration from wireguard-go!
momothereal··on Show HN: Onetun – Access your WireGuard network from anywhere
There's a few drawbacks to SSH tunneling:

- SSH uses TCP for transport, and tunneling TCP-over-TCP has considerable performance issues: http://sites.inka.de/~bigred/devel/tcp-tcp.html

- SSH doesn't support tunneling UDP out of the box (you need to either wrap UDP with TCP, or use SSH's -w option for creating a TUN interface, which requires root access).

WireGuard being a very simple UDP protocol has its advantages for things like this. The downside is you can't use onetun with the same private-key/assigned IP on multiple devices, since WG only supports 1 UDP endpoint per peer at a time.

Note: my tool doesn't support UDP in it's current state, but there's no technical reason it shouldn't be feasible (unlike SSH). I have a draft PR for it right now.

momothereal··on Show HN: Onetun – Access your WireGuard network from anywhere
Hey everyone, I wrote this tool because I wanted to be able to access ports running on peers in my WireGuard network from any computer/server; without having to install WireGuard locally and without having root access (no iptables configs).

So as long as you have a private key & peer IP dedicated for your roaming needs, you'll be able to forward a local port to a port on a secured peer.

This can be useful for a few other use-cases, like exposing services to the Internet from a separate server that doesn't have root access (like a non-privileged container).

I've also gotten feedback to enable reverse-tunneling (making a port accessible on a peer that forwards to a port running locally), which enables a few more use-cases. I'm looking for any more ideas or feedback that would fit in this tool!

I've described how the internals work in the README. It's still a proof-of-concept right now but I listed my little roadmap in the issues: reverse-tunneling, UDP support, multi-port-forwarding, etc. Happy to answer any questions.

momothereal··on How to Calculate the Trappiest Openings in Chess Using Stats
In sufficiently advanced CPU vs. CPU, the Black side would definitely resign on the first move.

However, assuming White has a 10% higher chance of winning in games between 2 Human players, that still leaves a decent margin of error for the White Human side to blunder during the game, so Black CPU wouldn't resign. This is assuming CPU doesn't know about that individual Human's blunder history.

Basically, CPUvCPU would definitely see an instant resign. In HUMvCPU, only the Human should definitely surrender as black. A Black CPU will keep playing in case the Human blunders.

momothereal··on A new public beta of GitHub Releases
- You can configure the auto-generated changelog to exclude users (e.g. dependabot) and labels[1]

- The automated changelog is based on PR titles, which allows you to edit them without rewriting history, and labelling them for filtering/grouping.

[1] https://docs.github.com/en/repositories/releasing-projects-o...

momothereal··on Facebook.com Is Listed for Sale
Looks more like this particular seller relies on DNS to check if a domain is available, instead of ICANN[1].

https://lookup.icann.org/lookup

momothereal··on Andrew Yang to launch a third party
I think we'd see a more left-leaning government overall though. But it would essentially be a permanent minority in parliament, which is not appealing to some people who want a more active government.

> PPC is irrelevant

Let's just hope they stay that way, the guy in my (very liberal) riding is completely off the handle with antivax stuff on twitter.

momothereal··on Andrew Yang to launch a third party
Pretty much what's happening in Canada. The NDP (left) currently polls at about 20% which would usually go to Liberals (center-left). Liberals and Conservatives (right) are now tied at 35% because of this.

Unfortunately the current Liberal PM promised "election reform" last election but didn't follow through. Now he might lose his minority gov.

← PreviousPage 2 of 6Next →