Posts

Setting up a VLAN

Image
  What follows is documentation for my home network VLAN configuration. An LLM was used to help with terminology. My focus is generally focused on the intent and sometimes that is misaligned with the common technical terms used to communicate some particular implementation. The machine is great at making that type of translation. Why do you want a VLAN?   Unless you're well versed with layer 2 networking, setting up a VLAN network is quite a tedious, so there had better be a good reason to set this thing up. I have a few reasons: Security:  I'm interested in setting up various cheap IOT devices for home automation, but I don't trust them. Putting them on a separate VLAN minimizes how much damage can be done by a rogue device.  Priority:  I also have IP Cameras generating a lot of traffic. I'd like to see how much traffic and have a way to lower its priority. More security : Any employer-managed device goes on a completely isolated network. Fun:  What ...

A Cautionary Tale of AI and VLANs

Image
  This turned out to be a cautionary tale. At the beginning I was hoping to find an AI success story that demonstrated the power of how it lets you wade into the deep end of a domain and find success. It turned into a grueling week of troubleshooting rabbit holes that the AI insisted I get to the bottom of. It's a powerful thing, but it takes a mindset that I'm still trying to figure out. I have what you might call a home lab and was thinking about adding some smart home devices. After a bit of yak shaving it became clear that I needed to setup a VLAN in order to partition the traffic. While I was at it I'd setup networks for IP cameras and my work computer. Last year I switched over to a proper firewall running OPNsense, so I figured all this would be a nice exercise to get practical experience with things I was generally already familiar with. Shortly after firing up ChatGPT I had a high level plan and a better understanding of how to design a network. With a couple manag...

Terminal UI the Easy Way: BubbleTEA

Image
For the past 18 months I've been tinkering with a terminal application that serves as an Algorand node frontend. I had a number of requirements in mind when choosing the technology: a full screen terminal application, works over ssh, extensible to allow it to evolve with different utilities and views of the system over time, be programmed with the Go programming language.  In the past I've created these sorts of programs with bash, but it's not fun to manage terminal control characters and deal with re-drawing with bash. Using bash has always led my applications to be simplistic, typically never getting beyond simple spinners and progress bars. I knew about ncurses, but didn't want to lose the portability of bash -- some of these scripts were even POSIX compliant, and honestly I just didn't want to deal with low level interfaces and C bindings. Enter bubbletea . The team at Charm has built the tools I didn't even know I needed. There is an impressive array of d...

Decommissioning the cloud: A self-hosted future

Cloud technology has slowly crept its way into nearly every aspect of our digital lives. And why not? It's convenient and easy to use, nothing to install or configure, and it's often free. Email clients are a great example of this. People used to live out of Microsoft Outlook or Lotus Notes , today all you need is a web browser. This starts becoming a problem when you consider your privacy. By using these services, especially the ones that don't cost money, the price is your private information. Consider your family photos and facial recognition, are you comfortable with Google knowing exactly who you associate with? What about your private documents? Even passwords are moving to the cloud with services like LastPass and 1Password ! Another consideration is whether the service will exist in the future. If you keep notes on the cloud, how upset would you be if that service was shutdown? If you don't run it yourself you're beholden to the company providing the servi...

Using a JFileChooser to browse AWS S3

After a bit of searching I was unable to find an off the shelf solution to let me browse S3 with a JFileChooser . The closest I found was an S3 FileSystem implementation, but that doesn't seem to be used by JFileChooser. Instead you need a custom FileSystemView , which I implemented using minio as a simple client library. The code is not incredibly complicated so I wont explain it in detail. You can see that the custom S3FileSystemView is simply passed to JFileChooser to insert the S3 logic. The most interesting method is getFiles , that is where I decided to insert the buckets at the top level, so there is one switch which decides whether to call listBuckets or  listObjects . From that point my custom VirtualFile objects are carefully constructed so that the File class plays nicely with JFileChooser. The result from selecting a file is something like s3:/bucket/path/to/file.txt  which you will need to download yourself.  VirtualFile  could probably be exten...

Novice to Coin Part 2 - Transactions

Image
We left off with an immutable data structure storing arbitrary data, you can read about that in part one , or you can view the introduction to this series here . As always,  the companion code for this post can be found on GitHub. In this post, we'll introduce transactions which are the primary feature needed to convert that data into a currency. Although a transaction simply needs to subtract coins from one account and add them to another, the way this is implemented in a blockchain is a little unusual. We'll cover all these details and more during this article before implementing them in the LynxCoin project. This is what we'll be working towards today. The first thing you need to understand about currencies stored on a blockchain is that there is no concept of a balance. Instead, you hold rights to transactions. Specifically, if you received a transaction for 50 LynxCoins, you now have the right to spend them. Our updated block looks like this. ...

Novice to Coin Part 1 - Blockchain Data Structure

Image
This is the first post in a series building a cryptocurrency from scratch, the series introduction can be found here . Every day new developers are learning just how simple blockchain technologies are. One of the first things you may notice is that the collection of algorithms are profoundly clever , but the mechanics of creating a verifiably immutable chain of data is borderline trivial. If you need proof, take a look at how many introductory  blog posts are building a toy blockchain . These all include working implementations of a blockchain. One good reason to implement your own is to prove to yourself just how trivial the data structure is. Certainly, my first reaction to reading up on bitcoins block header was: is this all? Of course, the answer is no. Creating a blockchain is table-stakes, and from there a series of clever algorithms allow transactions to occur without a central authority. But this structure is the heart of all that follows, so building a bloc...