File tree Expand file tree Collapse file tree 13 files changed +359
-581
lines changed Expand file tree Collapse file tree 13 files changed +359
-581
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,6 @@ go.work
22
22
23
23
# Input source → experimental results
24
24
* .txt
25
+
26
+ # Output binary
27
+ diode
Original file line number Diff line number Diff line change
1
+ BIN_NAME =diode
2
+ BIN_VERSION =0.1.0
3
+ BIN_DATE =$(shell date +% FT% T% z)
4
+
1
5
all : build
2
6
3
7
build :
4
- go build -o diode -ldflags=" -X main.SemVer=0.0.9 " diode.go
8
+ go build -o ${BIN_NAME} -ldflags=" -X ' main.SemVer=${BIN_VERSION} ' -X 'main.BuildInfo= ${BIN_DATE} ' "
5
9
6
10
test :
7
11
go test -v ./...
8
12
9
- run :
10
- go run diode.go
13
+ run : build
14
+ ./${BIN_NAME} --help
15
+
16
+ clean :
17
+ go clean
18
+ rm ${BIN_NAME}
11
19
Original file line number Diff line number Diff line change @@ -23,30 +23,27 @@ Scripts for verifying TCP passthrough functionality.
23
23
``` zsh
24
24
.
25
25
├── config
26
- ├── diode.go
27
- ├── diode_test.go
28
26
├── docker-compose.yaml
29
27
├── Dockerfile
30
28
├── docs
31
29
├── go.mod
32
30
├── go.sum
33
31
├── insights
32
+ ├── main.go
34
33
├── Makefile
35
34
├── README.md
36
35
├── sample
37
36
└── utility
38
37
39
- 5 directories, 8 files
38
+ 5 directories, 7 files
40
39
```
41
40
42
- #### Architecture Diagram (WIP)
41
+ #### Architecture Diagram
43
42
44
43
``` mermaid
45
44
graph LR
46
- A("Publish (MQTT)") --> B(TCP Client)
47
- B --> C(Data Diode)
48
- C --> D(TCP Server)
49
- D --> E("Subscribe (MQTT)")
45
+ A("Subscribe (MQTT)") -->|TCP Client|B(Data Diode) -->|TCP Server|C("Publish (MQTT)")
46
+
50
47
```
51
48
52
49
> [ !NOTE]
Original file line number Diff line number Diff line change 1
- # Data Diode Settings
2
- input :
3
- ip : " localhost"
4
- port : 49152
5
- timeout : 60 # seconds
6
- output :
7
- ip : " localhost"
8
- port : 13337
9
- tls : false
10
- broker :
11
- server : " localhost"
12
- port : 1883
13
- topic : " diode/telemetry"
1
+ # Project Settings
2
+ diode :
3
+ input :
4
+ ip : " localhost"
5
+ port : 49152
6
+ timeout : 60 # seconds
7
+ output :
8
+ ip : " localhost"
9
+ port : 13337
10
+ tls : false
11
+ mqtt :
12
+ inside :
13
+ server : " localhost"
14
+ port : 1883
15
+ topic : " #"
16
+ outside :
17
+ server : " localhost"
18
+ port : 1883
19
+ prefix : " diode"
20
+ # Avoid namespace collisions
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
module github.com/acep-uaf/data-diode
2
2
3
- go 1.22.1
3
+ go 1.22
4
4
5
5
require (
6
6
github.com/eclipse/paho.mqtt.golang v1.4.3
7
- github.com/google/uuid v1.6.0
8
7
github.com/olekukonko/tablewriter v0.0.5
9
8
github.com/urfave/cli/v2 v2.27.1
10
9
gopkg.in/yaml.v2 v2.4.0
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lV
2
2
github.com/cpuguy83/go-md2man/v2 v2.0.4 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
3
3
github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik =
4
4
github.com/eclipse/paho.mqtt.golang v1.4.3 /go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE =
5
- github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0 =
6
- github.com/google/uuid v1.6.0 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
7
5
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY =
8
6
github.com/gorilla/websocket v1.5.1 /go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY =
9
7
github.com/mattn/go-runewidth v0.0.9 /go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI =
You can’t perform that action at this time.
0 commit comments