Skip to content

Commit ebe4475

Browse files
committed
chore: format files and remove unused fcns
1 parent 139e5e2 commit ebe4475

File tree

13 files changed

+53
-67
lines changed

13 files changed

+53
-67
lines changed

.github/FUNDING.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# These are supported funding model platforms
2-
32
github: [christianchiarulli, jchiarulli]
43
patreon: chrisatmachine

.github/workflows/go.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,23 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "master" ]
8+
branches: ["master"]
99
pull_request:
10-
branches: [ "master" ]
10+
branches: ["master"]
1111

1212
jobs:
13-
1413
build:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v4
1817

19-
- name: Set up Go
20-
uses: actions/setup-go@v4
21-
with:
22-
go-version: '1.22.4'
18+
- name: Set up Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: "1.22.4"
2322

24-
- name: Build
25-
run: go build -v ./...
23+
- name: Build
24+
run: go build -v ./...
2625

27-
- name: Test
28-
run: go test -v ./...
26+
- name: Test
27+
run: go test -v ./...

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
relaywiz
1+
rwz
22

33
# Ignore .DS_Store files
44
.DS_Store

pkg/relays/khatru29/nginx_https.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ server {
3434
root /var/www/%s;
3535
3636
location / {
37-
# First attempt to serve request as file, then
38-
# as directory, then fall back to displaying 404.
39-
try_files $uri $uri/ =404;
40-
proxy_pass http://websocket_khatru29;
37+
# First attempt to serve request as file, then
38+
# as directory, then fall back to displaying 404.
39+
try_files $uri $uri/ =404;
40+
proxy_pass http://websocket_khatru29;
4141
proxy_http_version 1.1;
4242
proxy_set_header Upgrade $http_upgrade;
4343
proxy_set_header Connection $connection_upgrade;
@@ -68,7 +68,7 @@ server {
6868
# Compilation of the top cipher suites 2024:
6969
# https://ssl-config.mozilla.org/#server=nginx
7070
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305";
71-
71+
7272
# Perfect Forward Secrecy (PFS) is frequently compromised without this
7373
ssl_prefer_server_ciphers on;
7474

pkg/relays/khatru_pyramid/nginx_https.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ server {
3434
root /var/www/%s;
3535
3636
location / {
37-
# First attempt to serve request as file, then
38-
# as directory, then fall back to displaying 404.
39-
try_files $uri $uri/ =404;
40-
proxy_pass http://websocket_khatru_pyramid;
37+
# First attempt to serve request as file, then
38+
# as directory, then fall back to displaying 404.
39+
try_files $uri $uri/ =404;
40+
proxy_pass http://websocket_khatru_pyramid;
4141
proxy_http_version 1.1;
4242
proxy_set_header Upgrade $http_upgrade;
4343
proxy_set_header Connection $connection_upgrade;
@@ -68,7 +68,7 @@ server {
6868
# Compilation of the top cipher suites 2024:
6969
# https://ssl-config.mozilla.org/#server=nginx
7070
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305";
71-
71+
7272
# Perfect Forward Secrecy (PFS) is frequently compromised without this
7373
ssl_prefer_server_ciphers on;
7474

pkg/relays/strfry/nginx_http.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ func ConfigureNginxHttp(domainName string) {
2424
server {
2525
listen 80;
2626
listen [::]:80;
27-
server_name %s;
27+
server_name %s;
2828
29-
location /.well-known/acme-challenge/ {
29+
location /.well-known/acme-challenge/ {
3030
root /var/www/%s;
3131
allow all;
3232
}

pkg/relays/strfry/nginx_https.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ func ConfigureNginxHttps(domainName string) {
2525
root /var/www/%s;
2626
2727
location / {
28-
# First attempt to serve request as file, then
29-
# as directory, then fall back to displaying 404.
30-
try_files $uri $uri/ =404;
31-
proxy_pass http://127.0.0.1:7777;
32-
proxy_http_version 1.1;
28+
# First attempt to serve request as file, then
29+
# as directory, then fall back to displaying 404.
30+
try_files $uri $uri/ =404;
31+
proxy_pass http://127.0.0.1:7777;
32+
proxy_http_version 1.1;
3333
proxy_set_header Upgrade $http_upgrade;
34-
proxy_set_header Connection "upgrade";
34+
proxy_set_header Connection "upgrade";
3535
proxy_set_header Host $host;
36-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
36+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3737
}
3838
3939
#### SSL Configuration ####
@@ -59,7 +59,7 @@ func ConfigureNginxHttps(domainName string) {
5959
# Compilation of the top cipher suites 2024:
6060
# https://ssl-config.mozilla.org/#server=nginx
6161
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305";
62-
62+
6363
# Perfect Forward Secrecy (PFS) is frequently compromised without this
6464
ssl_prefer_server_ciphers on;
6565

pkg/relays/wot_relay/nginx_http.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func ConfigureNginxHttp(domainName string) {
2222

2323
configContent = fmt.Sprintf(`map $http_upgrade $connection_upgrade {
2424
default upgrade;
25-
'' close;
25+
'' close;
2626
}
2727
2828
upstream websocket_wot_relay {
@@ -32,23 +32,23 @@ upstream websocket_wot_relay {
3232
# %s
3333
server {
3434
listen 80;
35-
listen [::]:80;
36-
server_name %s;
35+
listen [::]:80;
36+
server_name %s;
3737
38-
location /.well-known/acme-challenge/ {
39-
root /var/www/%s;
40-
allow all;
41-
}
38+
location /.well-known/acme-challenge/ {
39+
root /var/www/%s;
40+
allow all;
41+
}
4242
4343
location / {
44-
proxy_pass http://websocket_wot_relay;
44+
proxy_pass http://websocket_wot_relay;
4545
proxy_set_header Host $host;
46-
proxy_set_header X-Real-IP $remote_addr;
46+
proxy_set_header X-Real-IP $remote_addr;
4747
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4848
proxy_set_header X-Forwarded-Proto $scheme;
4949
proxy_http_version 1.1;
5050
proxy_set_header Upgrade $http_upgrade;
51-
proxy_set_header Connection $connection_upgrade;
51+
proxy_set_header Connection $connection_upgrade;
5252
}
5353
}
5454
`, domainName, domainName, domainName)

pkg/relays/wot_relay/nginx_https.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ server {
3434
root /var/www/%s;
3535
3636
location / {
37-
# First attempt to serve request as file, then
38-
# as directory, then fall back to displaying 404.
39-
try_files $uri $uri/ =404;
40-
proxy_pass http://websocket_wot_relay;
37+
# First attempt to serve request as file, then
38+
# as directory, then fall back to displaying 404.
39+
try_files $uri $uri/ =404;
40+
proxy_pass http://websocket_wot_relay;
4141
proxy_set_header Host $host;
42-
proxy_set_header X-Real-IP $remote_addr;
42+
proxy_set_header X-Real-IP $remote_addr;
4343
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4444
proxy_set_header X-Forwarded-Proto $scheme;
4545
proxy_http_version 1.1;
4646
proxy_set_header Upgrade $http_upgrade;
47-
proxy_set_header Connection $connection_upgrade;
47+
proxy_set_header Connection $connection_upgrade;
4848
}
4949
5050
#### SSL Configuration ####
@@ -70,7 +70,7 @@ server {
7070
# Compilation of the top cipher suites 2024:
7171
# https://ssl-config.mozilla.org/#server=nginx
7272
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305";
73-
73+
7474
# Perfect Forward Secrecy (PFS) is frequently compromised without this
7575
ssl_prefer_server_ciphers on;
7676
@@ -83,7 +83,7 @@ server {
8383
8484
# By default, the buffer size is 16k, which corresponds to minimal overhead when sending big responses.
8585
# To minimize Time To First Byte it may be beneficial to use smaller values
86-
ssl_buffer_size 8k;
86+
ssl_buffer_size 8k;
8787
8888
# OCSP stapling
8989
ssl_stapling on;

pkg/relays/wot_relay/service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func SetupRelayService(domain, pubKey string) {
1818
<meta charset="UTF-8" />
1919
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2020
<title>WoT Relay</title>
21-
<meta name="description" content="WoT Relay" />
22-
<link href="https://{{.Domain}}" rel="canonical" />
21+
<meta name="description" content="WoT Relay" />
22+
<link href="https://{{.Domain}}" rel="canonical" />
2323
</head>
2424
<body>
2525
<main>

pkg/utils/git/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
type FileMode = fs.FileMode
1010

11-
// Function to remove directory
11+
// Function to clone a repository
1212
func Clone(branch, url, destDir string) {
1313
err := exec.Command("git", "clone", "-b", branch, url, destDir).Run()
1414
if err != nil {

pkg/utils/messages/utils.go

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package messages
22

33
import (
44
"fmt"
5-
65
"github.com/pterm/pterm"
76
)
87

pkg/utils/utils.go

-11
This file was deleted.

0 commit comments

Comments
 (0)