Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jenny Ryan
ouinet
Commits
65c540b2
Commit
65c540b2
authored
Apr 16, 2020
by
Peter Jankuliak
Browse files
ClientConfig: set default value for front-end
parent
954f915f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/client.cpp
View file @
65c540b2
...
...
@@ -1739,6 +1739,9 @@ void Client::State::serve_request( GenericStream&& con
Match
(
reqexpr
::
from_regex
(
host_getter
,
"localhost"
)
,
{
deque
<
fresh_channel
>
({
fresh_channel
::
_front_end
})}
),
Match
(
reqexpr
::
from_regex
(
host_getter
,
util
::
str
(
_config
.
front_end_endpoint
()))
,
{
deque
<
fresh_channel
>
({
fresh_channel
::
_front_end
})}
),
Match
(
reqexpr
::
from_regex
(
x_oui_dest_getter
,
"OuiClient"
)
,
{
deque
<
fresh_channel
>
({
fresh_channel
::
_front_end
})}
),
...
...
src/client_config.h
View file @
65c540b2
...
...
@@ -109,7 +109,7 @@ public:
// Client options
(
"listen-on-tcp"
,
po
::
value
<
string
>
(),
"IP:PORT endpoint on which we'll listen"
)
(
"front-end-ep"
,
po
::
value
<
string
>
()
,
po
::
value
<
string
>
()
->
default_value
(
"127.0.0.137:8081"
)
,
"Front-end's endpoint (in <IP>:<PORT> format)"
)
(
"tls-ca-cert-store-path"
,
po
::
value
<
string
>
(
&
_tls_ca_cert_store_path
)
,
"Path to the CA certificate store file"
)
...
...
@@ -306,14 +306,16 @@ ClientConfig::ClientConfig(int argc, char* argv[])
if
(
vm
.
count
(
"front-end-ep"
))
{
auto
ep_str
=
vm
[
"front-end-ep"
].
as
<
string
>
();
if
(
!
ep_str
.
empty
())
{
sys
::
error_code
ec
;
_front_end_endpoint
=
parse
::
endpoint
<
asio
::
ip
::
tcp
>
(
ep_str
,
ec
);
if
(
ep_str
.
empty
())
{
throw
std
::
runtime_error
(
"--front-end-ep must not be empty"
)
;
}
if
(
ec
)
{
throw
std
::
runtime_error
(
"Failed to parse endpoint
\"
"
+
ep_str
+
"
\"
"
);
}
sys
::
error_code
ec
;
_front_end_endpoint
=
parse
::
endpoint
<
asio
::
ip
::
tcp
>
(
ep_str
,
ec
);
if
(
ec
)
{
throw
std
::
runtime_error
(
"Failed to parse endpoint
\"
"
+
ep_str
+
"
\"
"
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment