@@ -114,11 +114,12 @@ func getVarsProcessor() vars.Processor {
114
114
return vars.Processor {FillerFactory : vars.MockFillerFactory {FakeAdapter : fakedata.FakeAdapter {}}}
115
115
}
116
116
117
- func startServer (ip string , port , portTLS int , done chan bool , router server.Resolver , mLog chan definition.Match , scenario scenario.Director , varsProcessor vars.Processor , spier match.Spier ) {
117
+ func startServer (ip string , port , portTLS int , configTLS string , done chan bool , router server.Resolver , mLog chan definition.Match , scenario scenario.Director , varsProcessor vars.Processor , spier match.Spier ) {
118
118
dispatcher := server.Dispatcher {
119
119
IP : ip ,
120
120
Port : port ,
121
121
PortTLS : portTLS ,
122
+ ConfigTLS : configTLS ,
122
123
Resolver : router ,
123
124
Translator : translate.HTTP {},
124
125
Processor : varsProcessor ,
@@ -145,6 +146,7 @@ func main() {
145
146
banner ()
146
147
outIP := getOutboundIP ()
147
148
path , err := filepath .Abs ("./config" )
149
+ TLS , err := filepath .Abs ("./tls" )
148
150
if err != nil {
149
151
panic (ErrNotFoundDefaultPath )
150
152
}
@@ -157,6 +159,7 @@ func main() {
157
159
cPort := flag .Int ("console-port" , 8082 , "Console server Port" )
158
160
console := flag .Bool ("console" , true , "Console enabled (true/false)" )
159
161
cPath := flag .String ("config-path" , path , "Mocks definition folder" )
162
+ cTLS := flag .String ("tls-path" , TLS , "TLS config folder (server.crt and server.key should be inside)" )
160
163
161
164
flag .Parse ()
162
165
@@ -180,7 +183,7 @@ func main() {
180
183
}
181
184
defer statistics .Stop ()
182
185
183
- go startServer (* sIP , * sPort , * sPortTLS , done , router , mLog , scenario , varsProcessor , spy )
186
+ go startServer (* sIP , * sPort , * sPortTLS , * cTLS , done , router , mLog , scenario , varsProcessor , spy )
184
187
log .Printf ("HTTP Server running at %s:%d\n " , * sIP , * sPort )
185
188
log .Printf ("HTTPS Server running at %s:%d\n " , * sIP , * sPortTLS )
186
189
if * console {
0 commit comments