Show HN: 100 LOC Ruby forward proxy using only standard libraries

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • forward-proxy

    Minimal HTTP(S) forward proxy using 150LOC and only standard libraries.

  • Agreed. I am not at all against people learning how to do it. But if that's the purpose then it's probably better to present it as such (like the resources at your link does). But the claim that all you need is 100 LOC to make a proxy server work is a bit bogus when you rely on Ruby's standard library. Look at the code at https://github.com/jamesmoriarty/forward-proxy/blob/main/lib.... As expected, it doesn't parse headers but uses stdlib's code to do that. Good, less likely to have bugs. But that means that you can claim that you implemented an HTTP header parser in one line of code:

      req_headers = Hash[req.header.map { |k, v| [k, v.first] }]

  • goxy

    Forward proxy for golang

  • Here's a Go version in 41 lines of source code I wrote in 2016:

    https://github.com/gophergala2016/goxy/blob/master/goxy.go

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • alexproxy

    An asynchronous HTTP/HTTPS proxy written in Go

  • https://github.com/alexrsagen/alexproxy

    It's got a couple more features than OP, check out the README.

  • build-your-own-x

    Discontinued 🤓 Build your own (insert technology here) [Moved to: https://github.com/codecrafters-io/build-your-own-x] (by danistefanovic)

  • Richard P. Feynman - you do not understand what you cannot build yourself. No better way to learn than to build your own proxy or you name it. See https://github.com/danistefanovic/build-your-own-x

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Build Your Own X

    1 project | news.ycombinator.com | 28 Mar 2024
  • Ask HN: Project based books/courses for C++?

    1 project | news.ycombinator.com | 27 Mar 2024
  • I want some fun things to code with python

    1 project | /r/learnpython | 11 Dec 2023
  • What now?

    1 project | /r/C_Programming | 10 Dec 2023
  • GitHub - codecrafters-io/build-your-own-x: Master programming by recreating your favorite technologies from scratch.

    1 project | /r/iot_sensors | 10 Dec 2023