@@ -91,7 +91,10 @@ var installCmd = &cobra.Command{
91
91
// Step 2: Configure the firewall
92
92
network .ConfigureFirewall ()
93
93
94
- // Setp 3: Create relay user
94
+ // Step 3: Configure the intrusion detection system
95
+ network .ConfigureIntrusionDetection ()
96
+
97
+ // Setp 4: Create relay user
95
98
spinner , _ := pterm .DefaultSpinner .Start (fmt .Sprintf ("Checking if '%s' user exists..." , relays .User ))
96
99
if ! users .UserExists (relays .User ) {
97
100
spinner .UpdateText (fmt .Sprintf ("Creating '%s' user..." , relays .User ))
@@ -102,118 +105,118 @@ var installCmd = &cobra.Command{
102
105
}
103
106
104
107
if selectedRelayOption == khatru_pyramid .RelayName {
105
- // Step 4 : Configure Nginx for HTTP
108
+ // Step 5 : Configure Nginx for HTTP
106
109
khatru_pyramid .ConfigureNginxHttp (relayDomain )
107
110
108
- // Step 5 : Get SSL/TLS certificates
111
+ // Step 6 : Get SSL/TLS certificates
109
112
httpsEnabled := network .GetCertificates (relayDomain )
110
113
if httpsEnabled {
111
- // Step 6 : Configure Nginx for HTTPS
114
+ // Step 7 : Configure Nginx for HTTPS
112
115
khatru_pyramid .ConfigureNginxHttps (relayDomain )
113
116
}
114
117
115
- // Step 7 : Download and install the relay binary
118
+ // Step 8 : Download and install the relay binary
116
119
khatru_pyramid .InstallRelayBinary (pubKey )
117
120
118
- // Step 8 : Set up the relay service
121
+ // Step 9 : Set up the relay service
119
122
khatru_pyramid .SetupRelayService (relayDomain , pubKey , relayContact )
120
123
121
- // Step 9 : Show success messages
124
+ // Step 10 : Show success messages
122
125
khatru_pyramid .SuccessMessages (relayDomain , httpsEnabled )
123
126
} else if selectedRelayOption == nostr_rs_relay .RelayName {
124
- // Step 4 : Configure Nginx for HTTP
127
+ // Step 5 : Configure Nginx for HTTP
125
128
nostr_rs_relay .ConfigureNginxHttp (relayDomain )
126
129
127
- // Step 5 : Get SSL/TLS certificates
130
+ // Step 6 : Get SSL/TLS certificates
128
131
httpsEnabled := network .GetCertificates (relayDomain )
129
132
if httpsEnabled {
130
- // Step 6 : Configure Nginx for HTTPS
133
+ // Step 7 : Configure Nginx for HTTPS
131
134
nostr_rs_relay .ConfigureNginxHttps (relayDomain )
132
135
}
133
136
134
- // Step 7 : Download and install the relay binary
137
+ // Step 8 : Download and install the relay binary
135
138
nostr_rs_relay .InstallRelayBinary ()
136
139
137
- // Step 8 : Set up the relay service
140
+ // Step 9 : Set up the relay service
138
141
nostr_rs_relay .SetupRelayService (relayDomain , pubKey , relayContact , httpsEnabled )
139
142
140
- // Step 9 : Show success messages
143
+ // Step 10 : Show success messages
141
144
nostr_rs_relay .SuccessMessages (relayDomain , httpsEnabled )
142
145
} else if selectedRelayOption == strfry .RelayName {
143
- // Step 4 : Configure Nginx for HTTP
146
+ // Step 5 : Configure Nginx for HTTP
144
147
strfry .ConfigureNginxHttp (relayDomain )
145
148
146
- // Step 5 : Get SSL/TLS certificates
149
+ // Step 6 : Get SSL/TLS certificates
147
150
httpsEnabled := network .GetCertificates (relayDomain )
148
151
if httpsEnabled {
149
- // Step 6 : Configure Nginx for HTTPS
152
+ // Step 7 : Configure Nginx for HTTPS
150
153
strfry .ConfigureNginxHttps (relayDomain )
151
154
}
152
155
153
- // Step 7 : Download and install the relay binary
156
+ // Step 8 : Download and install the relay binary
154
157
strfry .InstallRelayBinary ()
155
158
156
- // Step 8 : Set up the relay service
159
+ // Step 9 : Set up the relay service
157
160
strfry .SetupRelayService (relayDomain , relayContact )
158
161
159
- // Step 9 : Show success messages
162
+ // Step 10 : Show success messages
160
163
strfry .SuccessMessages (relayDomain , httpsEnabled )
161
164
} else if selectedRelayOption == wot_relay .RelayName {
162
- // Step 4 : Configure Nginx for HTTP
165
+ // Step 5 : Configure Nginx for HTTP
163
166
wot_relay .ConfigureNginxHttp (relayDomain )
164
167
165
- // Step 5 : Get SSL/TLS certificates
168
+ // Step 6 : Get SSL/TLS certificates
166
169
httpsEnabled := network .GetCertificates (relayDomain )
167
170
if httpsEnabled {
168
- // Step 6 : Configure Nginx for HTTPS
171
+ // Step 7 : Configure Nginx for HTTPS
169
172
wot_relay .ConfigureNginxHttps (relayDomain )
170
173
}
171
174
172
- // Step 7 : Download and install the relay binary
175
+ // Step 8 : Download and install the relay binary
173
176
wot_relay .InstallRelayBinary ()
174
177
175
- // Step 8 : Set up the relay service
178
+ // Step 9 : Set up the relay service
176
179
wot_relay .SetupRelayService (relayDomain , pubKey , relayContact , httpsEnabled )
177
180
178
- // Step 9 : Show success messages
181
+ // Step 10 : Show success messages
179
182
wot_relay .SuccessMessages (relayDomain , httpsEnabled )
180
183
} else if selectedRelayOption == khatru29 .RelayName {
181
- // Step 4 : Configure Nginx for HTTP
184
+ // Step 5 : Configure Nginx for HTTP
182
185
khatru29 .ConfigureNginxHttp (relayDomain )
183
186
184
- // Step 5 : Get SSL/TLS certificates
187
+ // Step 6 : Get SSL/TLS certificates
185
188
httpsEnabled := network .GetCertificates (relayDomain )
186
189
if httpsEnabled {
187
- // Step 6 : Configure Nginx for HTTPS
190
+ // Step 7 : Configure Nginx for HTTPS
188
191
khatru29 .ConfigureNginxHttps (relayDomain )
189
192
}
190
193
191
- // Step 7 : Download and install the relay binary
194
+ // Step 8 : Download and install the relay binary
192
195
khatru29 .InstallRelayBinary ()
193
196
194
- // Step 8 : Set up the relay service
197
+ // Step 9 : Set up the relay service
195
198
khatru29 .SetupRelayService (relayDomain , privKey , relayContact )
196
199
197
- // Step 9 : Show success messages
200
+ // Step 10 : Show success messages
198
201
khatru29 .SuccessMessages (relayDomain , httpsEnabled )
199
202
} else if selectedRelayOption == strfry29 .RelayName {
200
- // Step 4 : Configure Nginx for HTTP
203
+ // Step 5 : Configure Nginx for HTTP
201
204
strfry29 .ConfigureNginxHttp (relayDomain )
202
205
203
- // Step 5 : Get SSL/TLS certificates
206
+ // Step 6 : Get SSL/TLS certificates
204
207
httpsEnabled := network .GetCertificates (relayDomain )
205
208
if httpsEnabled {
206
- // Step 6 : Configure Nginx for HTTPS
209
+ // Step 7 : Configure Nginx for HTTPS
207
210
strfry29 .ConfigureNginxHttps (relayDomain )
208
211
}
209
212
210
- // Step 7 : Download and install the relay binary
213
+ // Step 8 : Download and install the relay binary
211
214
strfry29 .InstallRelayBinary ()
212
215
213
- // Step 8 : Set up the relay service
216
+ // Step 9 : Set up the relay service
214
217
strfry29 .SetupRelayService (relayDomain , privKey , relayContact )
215
218
216
- // Step 9 : Show success messages
219
+ // Step 10 : Show success messages
217
220
strfry29 .SuccessMessages (relayDomain , httpsEnabled )
218
221
}
219
222
0 commit comments