neo-thruster 0.1.0-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0e2989cbe51968d638e557ffd64be7b817337035cc682ffcfa8e4540e34b6121
4
+ data.tar.gz: e1014cae956bcfced633559ad6ece3d7a1f0ae44b8c793fc190237d9bfd37c07
5
+ SHA512:
6
+ metadata.gz: e4c9d8f8150211ec70fa2e3f041e4cf0d399af01053d18a97b3d8266cc4bb6d024e561c409a386598db6c5f41c4e25fab9f62638587844fe49251899dfa50471
7
+ data.tar.gz: 77f7462b83c1d1b39be9c40a60c5c795e7d5ad6f2927c14b7d739c471ea555669c350fc936ed6dbe2161f22db81c8ad947e214595775748c9b8abe747e0bcd91
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 37signals, LLC
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # About this fork
2
+
3
+ This is a fork of the original [thruster](https://github.com/basecamp/thruster)
4
+ proxy by the folks at Basecamp. The primary motivation to do this was to add
5
+ support for ZSTD compression, at the moment only GZip is supported.
6
+
7
+ The original README is below.
8
+
9
+ # Thruster
10
+
11
+ Thruster is an HTTP/2 proxy for simple production-ready deployments of Rails
12
+ applications. It runs alongside the Puma webserver to provide a few additional
13
+ features that help your app run efficiently and safely on the open Internet:
14
+
15
+ - HTTP/2 support
16
+ - Automatic TLS certificate management with Let's Encrypt
17
+ - Basic HTTP caching of public assets
18
+ - X-Sendfile support and compression, to efficiently serve static files
19
+
20
+ Thruster aims to be as zero-config as possible. It has no configuration file,
21
+ and most features are automatically enabled with sensible defaults. The goal is
22
+ that simply running your Puma server with Thruster should be enough to get a
23
+ production-ready setup.
24
+
25
+ The only exception to this is TLS provisioning: in order for Thruster to
26
+ provision TLS certificates, it needs to know which domain those certificates
27
+ should be for. So to use TLS, you need to set the `TLS_DOMAIN` environment
28
+ variable. If you don't set this variable, Thruster will run in HTTP-only mode.
29
+
30
+ Thruster also wraps the Puma process so that you can use it without managing
31
+ multiple processes yourself. This is particularly useful when running in a
32
+ containerized environment, where you typically won't have a process manager
33
+ available to coordinate the processes. Instead you can use Thruster as your
34
+ `CMD`, and it will manage Puma for you.
35
+
36
+ Thruster was originally created for the [ONCE](https://once.com) project, where
37
+ we wanted a no-fuss way to serve a Rails application from a single container,
38
+ directly on the open Internet. We've since found it useful for simple
39
+ deployments of other Rails applications.
40
+
41
+
42
+ ## Installation
43
+
44
+ Thruster is distributed as a Ruby gem. Because Thruster is written in Go, we
45
+ provide several pre-built platform-specific binaries. Installing the gem will
46
+ automatically fetch the appropriate binary for your platform.
47
+
48
+ To install it, add it to your application's Gemfile:
49
+
50
+ ```ruby
51
+ gem 'thruster'
52
+ ```
53
+
54
+ Or install it globally:
55
+
56
+ ```sh
57
+ $ gem install thruster
58
+ ```
59
+
60
+
61
+ ## Usage
62
+
63
+ To run your Puma application inside Thruster, prefix your usual command string
64
+ with `thrust`. For example:
65
+
66
+ ```sh
67
+ $ thrust bin/rails server
68
+ ```
69
+
70
+ Or with automatic TLS:
71
+
72
+ ```sh
73
+ $ TLS_DOMAIN=myapp.example.com thrust bin/rails server
74
+ ```
75
+
76
+
77
+ ## Custom configuration
78
+
79
+ In most cases, Thruster should work out of the box with no additional
80
+ configuration. But if you need to customize its behavior, there are a few
81
+ environment variables that you can set.
82
+
83
+ | Variable Name | Description | Default Value |
84
+ |-----------------------|---------------------------------------------------------|---------------|
85
+ | `TLS_DOMAIN` | Comma-separated list of domain names to use for TLS provisioning. If not set, TLS will be disabled. | None |
86
+ | `TARGET_PORT` | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |
87
+ | `CACHE_SIZE` | The size of the HTTP cache in bytes. | 64MB |
88
+ | `MAX_CACHE_ITEM_SIZE` | The maximum size of a single item in the HTTP cache in bytes. | 1MB |
89
+ | `X_SENDFILE_ENABLED` | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |
90
+ | `MAX_REQUEST_BODY` | The maximum size of a request body in bytes. Requests larger than this size will be refused; `0` means no maximum size is enforced. | `0` |
91
+ | `STORAGE_PATH` | The path to store Thruster's internal state. Provisioned TLS certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |
92
+ | `BAD_GATEWAY_PAGE` | Path to an HTML file to serve when the backend server returns a 502 Bad Gateway error. If there is no file at the specific path, Thruster will serve an empty 502 response instead. Because Thruster boots very quickly, a custom page can be a useful way to show that your application is starting up. | `./public/502.html` |
93
+ | `HTTP_PORT` | The port to listen on for HTTP traffic. | 80 |
94
+ | `HTTPS_PORT` | The port to listen on for HTTPS traffic. | 443 |
95
+ | `HTTP_IDLE_TIMEOUT` | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |
96
+ | `HTTP_READ_TIMEOUT` | The maximum time in seconds that a client can take to send the request headers and body. | 30 |
97
+ | `HTTP_WRITE_TIMEOUT` | The maximum time in seconds during which the client must read the response. | 30 |
98
+ | `ACME_DIRECTORY` | The URL of the ACME directory to use for TLS certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |
99
+ | `EAB_KID` | The EAB key identifier to use when provisioning TLS certificates, if required. | None |
100
+ | `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |
101
+ | `FORWARD_HEADERS` | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |
102
+ | `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
103
+
104
+ To prevent naming clashes with your application's own environment variables,
105
+ Thruster's environment variables can optionally be prefixed with `THRUSTER_`.
106
+ For example, `TLS_DOMAIN` can also be written as `THRUSTER_TLS_DOMAIN`. Whenever
107
+ a prefixed variable is set, it will take precedence over the unprefixed version.
Binary file
data/exe/thrust ADDED
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ PLATFORM = [ :cpu, :os ].map { |m| Gem::Platform.local.send(m) }.join("-")
4
+ EXECUTABLE = File.expand_path(File.join(__dir__, PLATFORM, "thrust"))
5
+
6
+ if File.exist?(EXECUTABLE)
7
+ exec(EXECUTABLE, *ARGV)
8
+ else
9
+ STDERR.puts("ERROR: Unsupported platform: #{PLATFORM}")
10
+ exit 1
11
+ end
@@ -0,0 +1,3 @@
1
+ module Thruster
2
+ VERSION = "0.1.0"
3
+ end
data/lib/thruster.rb ADDED
@@ -0,0 +1,4 @@
1
+ module Thruster
2
+ end
3
+
4
+ require_relative "thruster/version"
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neo-thruster
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: aarch64-linux
6
+ authors:
7
+ - Kevin McConnell
8
+ - Shivam Mishra
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2025-01-23 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A fork of thruster - A zero-config HTTP/2 proxy for lightweight production
15
+ deployments with zstd support
16
+ email: hey@shivam.dev
17
+ executables:
18
+ - thrust
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - MIT-LICENSE
23
+ - README.md
24
+ - exe/aarch64-linux/thrust
25
+ - exe/thrust
26
+ - lib/thruster.rb
27
+ - lib/thruster/version.rb
28
+ homepage: https://github.com/scmmishra/neo-thruster
29
+ licenses:
30
+ - MIT
31
+ metadata:
32
+ homepage_uri: https://github.com/scmmishra/neo-thruster
33
+ rubygems_mfa_required: 'true'
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubygems_version: 3.5.11
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Zero-config HTTP/2 proxy
53
+ test_files: []