Skip to content

Commit 48bf851

Browse files
committed
Initial commit
0 parents  commit 48bf851

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3805
-0
lines changed

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: "Build & Release"
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
run:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
build:
14+
- target: "macOS"
15+
platform: "darwin/universal"
16+
17+
- target: "Win"
18+
platform: "windows/amd64"
19+
20+
runs-on: >-
21+
${{
22+
contains(matrix.build.platform, 'windows') && 'windows-latest' ||
23+
contains(matrix.build.platform, 'darwin') && 'macos-latest' ||
24+
'ubuntu-latest'
25+
}}
26+
27+
env:
28+
NODE_OPTIONS: "--max-old-space-size=4096"
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
34+
- name: Install Go
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: "1.23"
38+
39+
- name: Install node
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version: "20"
43+
44+
- name: Install pnpm
45+
uses: pnpm/action-setup@v4
46+
with:
47+
package_json_file: frontend/package.json
48+
49+
- name: Install wails
50+
run: go install github.com/wailsapp/wails/v2/cmd/[email protected]
51+
52+
- name: Build app
53+
run: >
54+
wails build
55+
-clean
56+
-platform ${{ matrix.build.platform }}
57+
58+
- name: Fix macOS binary permissions
59+
if: matrix.build.target == 'macOS'
60+
run: >
61+
chmod +x build/bin/*/Contents/MacOS/*
62+
63+
- name: Create and prepare release directory
64+
run: |
65+
mkdir -p release/pkg
66+
mkdir -p release/RailwayNetDiag_${{ matrix.build.target }}
67+
mv build/bin/* release/RailwayNetDiag_${{ matrix.build.target }}/
68+
69+
- name: Package for release
70+
uses: thedoctor0/[email protected]
71+
with:
72+
type: zip
73+
directory: release
74+
path: RailwayNetDiag_${{ matrix.build.target }}
75+
filename: pkg/RailwayNetDiag_${{ matrix.build.target }}.zip
76+
77+
- name: Release
78+
uses: softprops/action-gh-release@v1
79+
with:
80+
files: release/pkg/**

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/build/bin/**
2+
**/node_modules/**
3+
**/dist/**
4+
*.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Railway Corporation
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 all
13+
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 THE
21+
SOFTWARE.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Railway NetDiag
2+
3+
[**Download for macOS**](https://github.com/railwayapp/netdiag/releases/latest/download/RailwayNetDiag_macOS.zip) | [**Download for Windows**](https://github.com/railwayapp/netdiag/releases/latest/download/RailwayNetDiag_Win.zip)
4+
5+
macOS & Windows application for diagnosing client networking issues to Railway.
6+
7+
![railway-netdiag screenshot](./docs/screenshot.png)
8+
9+
## Usage
10+
11+
1. Download the latest version ([macOS](https://github.com/railwayapp/netdiag/releases/latest/download/RailwayNetDiag_macOS.zip) | [Windows](https://github.com/railwayapp/netdiag/releases/latest/download/RailwayNetDiag_Win.zip))
12+
2. Open the application
13+
3. Click "Run Diagnostics"
14+
4. Wait for the diagnostics to complete
15+
5. Copy the results to your clipboard or save them to a file
16+
6. Share the results with Railway support for further assistance
17+
18+
## ⚠️ About Security Warnings
19+
20+
When you launch the application for the first time, you may encounter security
21+
warnings from your OS. **This happens because the app is not code-signed yet**.
22+
You can wait for a new release of the code-signed app (by mid-Sept '25), or
23+
you can use it now by bypassing the warnings:
24+
25+
- On macOS:
26+
1. Open the app once
27+
2. Go to System Preferences -> Privacy & Security
28+
3. Scroll down to the warning at the bottom under "Allow applications from"
29+
4. Click "Open Anyway" for Railway NetDiag.app
30+
31+
- On Windows:
32+
1. Click "More info" on the "Windows protected your PC" popup
33+
2. Click "Run Anyway"
34+
35+
## Development
36+
37+
This is a [Wails](https://wails.io) + React application. To get started:
38+
39+
1. Clone the repository
40+
2. Install [Wails](https://wails.io/docs/gettingstarted/installation) on your system
41+
3. Run `wails dev` to start the application in development mode
42+
43+
### Structure
44+
45+
```
46+
core/ - Go backend code
47+
frontend/ - React frontend code
48+
main.go - Main entry point for the application
49+
```
50+
51+
### Building
52+
53+
Use `wails build` to create a production build of the application:
54+
55+
```
56+
wails build -clean -platform=windows/amd64 # Windows
57+
wails build -clean -platform=darwin/universal # macOS
58+
```
59+
60+
This should only be necessary when testing in local dev. For production
61+
releases, create a new release on GitHub and the build+release will be
62+
performed automatically.
63+
64+
## License
65+
66+
[MIT Copyright (c) 2025 Railway Corporation](./LICENSE)

build/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Build Directory
2+
3+
The build directory is used to house all the build files and assets for your application.
4+
5+
The structure is:
6+
7+
* bin - Output directory
8+
* darwin - macOS specific files
9+
* windows - Windows specific files
10+
11+
## Mac
12+
13+
The `darwin` directory holds files specific to Mac builds.
14+
These may be customised and used as part of the build. To return these files to the default state, simply delete them
15+
and
16+
build with `wails build`.
17+
18+
The directory contains the following files:
19+
20+
- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
21+
- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.
22+
23+
## Windows
24+
25+
The `windows` directory contains the manifest and rc files used when building with `wails build`.
26+
These may be customised for your application. To return these files to the default state, simply delete them and
27+
build with `wails build`.
28+
29+
- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
30+
use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
31+
will be created using the `appicon.png` file in the build directory.
32+
- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
33+
- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
34+
as well as the application itself (right click the exe -> properties -> details)
35+
- `wails.exe.manifest` - The main application manifest file.

build/appicon.png

184 KB
Loading

build/darwin/Info.dev.plist

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2+
<plist version="1.0">
3+
<dict>
4+
<key>CFBundlePackageType</key>
5+
<string>APPL</string>
6+
<key>CFBundleName</key>
7+
<string>{{.Info.ProductName}}</string>
8+
<key>CFBundleExecutable</key>
9+
<string>{{.OutputFilename}}</string>
10+
<key>CFBundleIdentifier</key>
11+
<string>com.railway.{{.Name}}</string>
12+
<key>CFBundleVersion</key>
13+
<string>{{.Info.ProductVersion}}</string>
14+
<key>CFBundleGetInfoString</key>
15+
<string>{{.Info.Comments}}</string>
16+
<key>CFBundleShortVersionString</key>
17+
<string>{{.Info.ProductVersion}}</string>
18+
<key>CFBundleIconFile</key>
19+
<string>iconfile</string>
20+
<key>LSMinimumSystemVersion</key>
21+
<string>10.13.0</string>
22+
<key>NSHighResolutionCapable</key>
23+
<string>true</string>
24+
<key>NSHumanReadableCopyright</key>
25+
<string>{{.Info.Copyright}}</string>
26+
{{if .Info.FileAssociations}}
27+
<key>CFBundleDocumentTypes</key>
28+
<array>
29+
{{range .Info.FileAssociations}}
30+
<dict>
31+
<key>CFBundleTypeExtensions</key>
32+
<array>
33+
<string>{{.Ext}}</string>
34+
</array>
35+
<key>CFBundleTypeName</key>
36+
<string>{{.Name}}</string>
37+
<key>CFBundleTypeRole</key>
38+
<string>{{.Role}}</string>
39+
<key>CFBundleTypeIconFile</key>
40+
<string>{{.IconName}}</string>
41+
</dict>
42+
{{end}}
43+
</array>
44+
{{end}}
45+
{{if .Info.Protocols}}
46+
<key>CFBundleURLTypes</key>
47+
<array>
48+
{{range .Info.Protocols}}
49+
<dict>
50+
<key>CFBundleURLName</key>
51+
<string>com.wails.{{.Scheme}}</string>
52+
<key>CFBundleURLSchemes</key>
53+
<array>
54+
<string>{{.Scheme}}</string>
55+
</array>
56+
<key>CFBundleTypeRole</key>
57+
<string>{{.Role}}</string>
58+
</dict>
59+
{{end}}
60+
</array>
61+
{{end}}
62+
<key>NSAppTransportSecurity</key>
63+
<dict>
64+
<key>NSAllowsLocalNetworking</key>
65+
<true/>
66+
</dict>
67+
</dict>
68+
</plist>

build/darwin/Info.plist

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2+
<plist version="1.0">
3+
<dict>
4+
<key>CFBundlePackageType</key>
5+
<string>APPL</string>
6+
<key>CFBundleName</key>
7+
<string>{{.Info.ProductName}}</string>
8+
<key>CFBundleExecutable</key>
9+
<string>{{.OutputFilename}}</string>
10+
<key>CFBundleIdentifier</key>
11+
<string>com.railway.{{.Name}}</string>
12+
<key>CFBundleVersion</key>
13+
<string>{{.Info.ProductVersion}}</string>
14+
<key>CFBundleGetInfoString</key>
15+
<string>{{.Info.Comments}}</string>
16+
<key>CFBundleShortVersionString</key>
17+
<string>{{.Info.ProductVersion}}</string>
18+
<key>CFBundleIconFile</key>
19+
<string>iconfile</string>
20+
<key>LSMinimumSystemVersion</key>
21+
<string>10.13.0</string>
22+
<key>NSHighResolutionCapable</key>
23+
<string>true</string>
24+
<key>NSHumanReadableCopyright</key>
25+
<string>{{.Info.Copyright}}</string>
26+
{{if .Info.FileAssociations}}
27+
<key>CFBundleDocumentTypes</key>
28+
<array>
29+
{{range .Info.FileAssociations}}
30+
<dict>
31+
<key>CFBundleTypeExtensions</key>
32+
<array>
33+
<string>{{.Ext}}</string>
34+
</array>
35+
<key>CFBundleTypeName</key>
36+
<string>{{.Name}}</string>
37+
<key>CFBundleTypeRole</key>
38+
<string>{{.Role}}</string>
39+
<key>CFBundleTypeIconFile</key>
40+
<string>{{.IconName}}</string>
41+
</dict>
42+
{{end}}
43+
</array>
44+
{{end}}
45+
{{if .Info.Protocols}}
46+
<key>CFBundleURLTypes</key>
47+
<array>
48+
{{range .Info.Protocols}}
49+
<dict>
50+
<key>CFBundleURLName</key>
51+
<string>com.wails.{{.Scheme}}</string>
52+
<key>CFBundleURLSchemes</key>
53+
<array>
54+
<string>{{.Scheme}}</string>
55+
</array>
56+
<key>CFBundleTypeRole</key>
57+
<string>{{.Role}}</string>
58+
</dict>
59+
{{end}}
60+
</array>
61+
{{end}}
62+
</dict>
63+
</plist>

build/windows/icon.ico

86.8 KB
Binary file not shown.

build/windows/info.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"fixed": {
3+
"file_version": "{{.Info.ProductVersion}}"
4+
},
5+
"info": {
6+
"0000": {
7+
"ProductVersion": "{{.Info.ProductVersion}}",
8+
"CompanyName": "{{.Info.CompanyName}}",
9+
"FileDescription": "{{.Info.ProductName}}",
10+
"LegalCopyright": "{{.Info.Copyright}}",
11+
"ProductName": "{{.Info.ProductName}}",
12+
"Comments": "{{.Info.Comments}}"
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)