Skip to content
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

Force reverse tunnel socket to be binded to localhost #600

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Force pfsr source to be bounded to localhost
  • Loading branch information
lostystyg committed Sep 1, 2023
commit 7f4335f8dd607b5b011e0b3faa4fb9150a5c1930
2 changes: 2 additions & 0 deletions src/base/TunnelUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ vector<PortForwardSourceRequest> parseRangesToRequests(const string& input) {
int portRangeLength = sourcePortEnd - sourcePortStart + 1;
for (int i = 0; i < portRangeLength; ++i) {
PortForwardSourceRequest pfsr;
pfsr.mutable_source()->set_name("localhost");
pfsr.mutable_source()->set_port(sourcePortStart + i);
pfsr.mutable_destination()->set_port(destinationPortStart + i);
pfsrs.push_back(pfsr);
Expand All @@ -49,6 +50,7 @@ vector<PortForwardSourceRequest> parseRangesToRequests(const string& input) {
"destination must be a range (and vice versa)");
} else {
PortForwardSourceRequest pfsr;
pfsr.mutable_source()->set_name("localhost");
pfsr.mutable_source()->set_port(stoi(sourceDestination[0]));
pfsr.mutable_destination()->set_port(stoi(sourceDestination[1]));
pfsrs.push_back(pfsr);
Expand Down
Loading