ser 0.1.0-x86_64-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: 716cd78ee8933a44c4de60bc7553da7e9a653b8c3ff7f2e5867b3bde84bccc23
4
+ data.tar.gz: e94a7e01c0fe829d78006e669d99c28c277cba92a696d6695d2a3ea7147cf691
5
+ SHA512:
6
+ metadata.gz: b2739f46a5182103bf3ecd7aef457b3be485d5106ca5eb094654476cfb688fad0781667794ccb664a54489da2a410be14a56ea2a63d30a18ec7f116b020e8857
7
+ data.tar.gz: c9542708dbd3fb3dd4eb3d712c199b32f7c73f406b6443a493e4682a5255a949a41d71200d850bafc98069a2e8d3a98f32abdca89ea4aab78e73031735e9f5c3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 3v0k4
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # Ser
2
+
3
+ <div align="center">
4
+ <img width="250" width="250" src=".github/images/ser.png" />
5
+ </div>
6
+
7
+ <br />
8
+
9
+ Ser(ve) your web app with HTTPS to any device on your network (mDNS):
10
+ - Use convenient domain names without ports (`https://app.local` vs `http://127.0.0.1:3000`)
11
+ - Use mDNS for `.local` domains, so you can visit them from your phone or any other device connected to the same network
12
+ - Locally-trusted development certificates (read on [filosottile/mkcert](https://github.com/filosottile/mkcert) how to trust certificates on mobile devices)
13
+
14
+ Use-cases:
15
+ - Simulate production-like subdomains (e.g., `blog.example.com`, `api.example.com`)
16
+ - Test cookies scoped to specific domains
17
+ - Preview multi-tenant routing (e.g., `tenant1.example.com`, `tenant2.example.com`)
18
+ - Use third-party APIs that need HTTPS
19
+
20
+ ## Installation
21
+
22
+ You can install ser with Go:
23
+
24
+ ```bash
25
+ go install github.com/3v0k4/ser
26
+ ```
27
+
28
+ Ser is also distributed as a Ruby gem. Because Ser is written in Go, several pre-built platform-specific binaries are available. Installing the gem will automatically fetch the appropriate binary for your platform.
29
+
30
+ To install it, add it to your application's Gemfile:
31
+
32
+ ```ruby
33
+ gem 'ser'
34
+ ```
35
+
36
+ Or install it globally:
37
+
38
+ ```sh
39
+ $ gem install ser
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ If your app server listens on `http://localhost:3000`, you can just run `ser [APP-SERVER]` and visit `https://ser.local` on any device connected to the same network.
45
+
46
+ Otherwise, you can customise the addresses with ENVs:
47
+
48
+ ```bash
49
+ Usage: ser CMD
50
+
51
+ Ser(ve) your web app with HTTPS to any device on your network (mDNS):
52
+ Provisions HTTPS certificates for FROM
53
+ Executes CMD
54
+ Proxies requests from FROM to TO
55
+ Starts a mDNS server to announce FROM (if .local)
56
+
57
+ Arguments:
58
+ CMD the command that launches the app server (it must expect requests at TO)
59
+
60
+ ENVs:
61
+ FROM (default: https://ser.local) comma-separated HTTPS domains you want to access
62
+ SER_FROM same as above but takes precedence
63
+ TO (default: http://localhost:3000) address where CMD expects requests
64
+ SER_TO same as above but takes precedence
65
+
66
+ Examples:
67
+ ser bundle exec rails server
68
+ # Access the Rails app at https://ser.local (from your phone)
69
+
70
+ FROM=https://app.local TO=http://127.0.0.1:8080 ser npm run start
71
+ # Access the Node app at https://app.local (from your phone)
72
+ ```
73
+
74
+ ## Development
75
+
76
+ ### Testing
77
+
78
+ ```bash
79
+ make test
80
+ ```
81
+
82
+ ### Running || Building
83
+
84
+ You can run the application using `go run`:
85
+
86
+ ```bash
87
+ go run ./cmd/ser
88
+ ```
89
+
90
+ You can also build for the current environment (`bin/`) using the Makefile:
91
+
92
+ ```bash
93
+ make build
94
+ ```
95
+
96
+ To build binaries for all supported architectures and operating systems (`dist/`), use:
97
+
98
+ ```bash
99
+ make dist
100
+ ```
101
+
102
+ ### Releasing
103
+
104
+ In order to ship the platform-specific binary inside a gem, multiple gems are released, one for each platform. The `rake release` task builds all the necessary gems.
105
+
106
+ Checklist:
107
+
108
+ - Update version & changelog:
109
+ - [ ] Update `lib/ser/version.rb`
110
+ - [ ] Update `CHANGELOG.md`
111
+ - [ ] Commit and `git tag vX.Y.Z`
112
+
113
+ - Build native gems:
114
+ - [ ] `rake clobber` (to clean up any old packages)
115
+ - [ ] `rake package`
116
+
117
+ - Push gems:
118
+ - [ ] `for g in pkg/*.gem ; do gem push $g ; done`
119
+ - [ ] `git push`
120
+
121
+ ## Contributing
122
+
123
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/3v0k4/ser).
124
+
125
+ ## License
126
+
127
+ The module is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/exe/ser 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, "ser"))
5
+
6
+ if File.exist?(EXECUTABLE)
7
+ exec(EXECUTABLE, *ARGV)
8
+ else
9
+ STDERR.puts("ERROR: Unsupported platform: #{PLATFORM}")
10
+ exit 1
11
+ end
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ser
4
+ VERSION = '0.1.0'
5
+ end
data/lib/ser.rb ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ser
4
+ end
5
+
6
+ require_relative 'ser/version'
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ser
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: x86_64-linux
6
+ authors:
7
+ - 3v0k4
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: |
13
+ Ser(ve) your web app with HTTPS to any device on your network (mDNS):
14
+ 1. Use convenient domain names without ports (https://app.local vs http://127.0.0.1:3000);
15
+ 2. Use mDNS for .local domains, so you can visit them from your phone or any other device connected to the same network;
16
+ 3. Locally-trusted development certificates (read on filosottile/mkcert how to trust certificates on mobile devices).
17
+
18
+ Use-cases:
19
+ 1. Simulate production-like subdomains (e.g., blog.example.com, api.example.com);
20
+ 2. Test cookies scoped to specific domains;
21
+ 3. Preview multi-tenant routing (e.g., tenant1.example.com, tenant2.example.com);
22
+ 4. Use third-party APIs that need HTTPS.
23
+ email:
24
+ - riccardo.odone@gmail.com
25
+ executables:
26
+ - ser
27
+ extensions: []
28
+ extra_rdoc_files: []
29
+ files:
30
+ - LICENSE.txt
31
+ - README.md
32
+ - exe/ser
33
+ - exe/x86_64-linux/ser
34
+ - lib/ser.rb
35
+ - lib/ser/version.rb
36
+ homepage: https://github.com/3v0k4/ser
37
+ licenses:
38
+ - MIT
39
+ metadata:
40
+ homepage_uri: https://github.com/3v0k4/ser
41
+ rubygems_mfa_required: 'true'
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 2.3.0
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubygems_version: 3.6.9
57
+ specification_version: 4
58
+ summary: Ser(ve) your web app with HTTPS to any device on your network (mDNS)
59
+ test_files: []