Skip to content

Commit

Permalink
Add a default user (jack) to avoid forget to become a public service
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Oct 30, 2023
1 parent 4eb1076 commit c8f8772
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion server/proxy_server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,21 @@ inline void print_args(int argc, char** argv, const po::variables_map& vm)
}
}

namespace std
{
std::ostream& operator<<(std::ostream &os, const std::vector<std::string> &users)
{
for (auto it = users.begin(); it != users.end();)
{
os << *it;
if (++it == users.end())
break;
os << " ";
}

return os;
}
}

int main(int argc, char** argv)
{
Expand All @@ -209,7 +224,7 @@ int main(int argc, char** argv)
("happyeyeballs", po::value<bool>(&happyeyeballs)->default_value(true), "Enable Happy Eyeballs algorithm for TCP connections.")
("local_ip", po::value<std::string>(&local_ip), "Specify local IP for client TCP connection to server.")

("auth_users", po::value<std::vector<std::string>>(&auth_users)->multitoken()->value_name("user:passwd"), "List of authorized users (e.g: user:passwd).")
("auth_users", po::value<std::vector<std::string>>(&auth_users)->multitoken()->default_value(std::vector<std::string>{"jack:1111"}), "List of authorized users (e.g: user1:passwd1 user2:passwd2).")

("proxy_pass", po::value<std::string>(&proxy_pass)->default_value("")->value_name(""), "Specify next proxy pass (e.g: socks5://user:passwd@ip:port).")
("proxy_pass_ssl", po::value<bool>(&proxy_pass_ssl)->default_value(false, "false")->value_name(""), "Enable SSL for the next proxy pass.")
Expand Down

0 comments on commit c8f8772

Please sign in to comment.