-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy endpoint with path enhancement #146
base: main
Are you sure you want to change the base?
Changes from 4 commits
7ca4727
6b3912e
7652baf
b9124c0
9dda9bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,7 @@ bool process_cli(int argc, char ** argv, LocalproxyConfig &cfg, ptree &settings, | |
("access-token,t", value<string>()->required(), "Client access token") | ||
("client-token,i", value<string>(), "Optional Client Token") | ||
("proxy-endpoint,e", value<string>(), "Endpoint of proxy server with port (if not default 443). Example: data.tunneling.iot.us-east-1.amazonaws.com:443") | ||
("endpoint-path,p", value<string>()->default_value("/tunnel"), "Endpoint path of proxy server if need extra path. Example: reverse-proxy.domain.com/aws-data-service/tunnel, so you connect with -e reverse-proxy.domain.com -p /aws-data-service/tunnel") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please set the endpoint default value in an global variable in header file and set it as default over there. It would be easier to maintain it that way. Also add about this default endpoint value in readme. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for Harsh's point, add to: https://github.com/aws-samples/aws-iot-securetunneling-localproxy/blob/main/src/LocalproxyConfig.h |
||
("region,r", value<string>(), "Endpoint region where tunnel exists. Mutually exclusive flag with --proxy-endpoint") | ||
("source-listen-port,s", value<string>(), "Sets the mappings between source listening ports and service identifier. Example: SSH1=5555 or 5555") | ||
("destination-app,d", value<string>(), "Sets the mappings between the endpoint(address:port/port) and service identifier. Example: SSH1=127.0.0.1:22 or 22") | ||
|
@@ -200,7 +201,7 @@ bool process_cli(int argc, char ** argv, LocalproxyConfig &cfg, ptree &settings, | |
store(parse_config_file(vm["config"].as<string>().c_str(), cliargs_desc), vm); | ||
} | ||
//either way, parse from environment | ||
store(parse_environment(cliargs_desc, | ||
store(parse_environment(cliargs_desc, | ||
[](std::string name) -> std::string | ||
{ | ||
if (name == ACCESS_TOKEN_ENV_VARIABLE) | ||
|
@@ -234,6 +235,7 @@ bool process_cli(int argc, char ** argv, LocalproxyConfig &cfg, ptree &settings, | |
BOOST_LOG_TRIVIAL(warning) << "Found access token supplied via CLI arg. Consider using environment variable " << ACCESS_TOKEN_ENV_VARIABLE << " instead"; | ||
} | ||
cfg.access_token = vm["access-token"].as<string>(); | ||
cfg.url_path = vm["endpoint-path"].as<string>(); | ||
|
||
if (vm.count("client-token") != 0) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add details about this in readme?