Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
udp-forwarder-ex
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
udp-forwarder-ex
Commits
221ccbe3
There was an error fetching the commit references. Please try again later.
Unverified
Commit
221ccbe3
authored
4 years ago
by
Bensong Liu
Browse files
Options
Downloads
Patches
Plain Diff
update prot name
parent
8a76a784
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/forwarder.hpp
+2
-2
2 additions, 2 deletions
src/forwarder.hpp
src/protocols/dynport.hpp
+2
-3
2 additions, 3 deletions
src/protocols/dynport.hpp
with
4 additions
and
5 deletions
src/forwarder.hpp
+
2
−
2
View file @
221ccbe3
...
@@ -20,7 +20,7 @@ public:
...
@@ -20,7 +20,7 @@ public:
Forwarder
(
const
rlib
::
string
&
inboundConfig
,
const
rlib
::
string
&
outboundConfig
,
const
std
::
list
<
rlib
::
string
>
&
filterConfigs
)
{
Forwarder
(
const
rlib
::
string
&
inboundConfig
,
const
rlib
::
string
&
outboundConfig
,
const
std
::
list
<
rlib
::
string
>
&
filterConfigs
)
{
if
(
inboundConfig
.
starts_with
(
"plain"
))
if
(
inboundConfig
.
starts_with
(
"plain"
))
ptrInbound
=
new
Protocols
::
PlainInbound
;
ptrInbound
=
new
Protocols
::
PlainInbound
;
else
if
(
inboundConfig
.
starts_with
(
"
misc
"
))
else
if
(
inboundConfig
.
starts_with
(
"
dynport
"
))
ptrInbound
=
nullptr
;
// TODO
ptrInbound
=
nullptr
;
// TODO
else
else
throw
std
::
invalid_argument
(
"Unknown protocol in inboundConfig "
+
inboundConfig
);
throw
std
::
invalid_argument
(
"Unknown protocol in inboundConfig "
+
inboundConfig
);
...
@@ -28,7 +28,7 @@ public:
...
@@ -28,7 +28,7 @@ public:
if
(
outboundConfig
.
starts_with
(
"plain"
))
if
(
outboundConfig
.
starts_with
(
"plain"
))
ptrOutbound
=
new
Protocols
::
PlainOutbound
;
ptrOutbound
=
new
Protocols
::
PlainOutbound
;
else
if
(
outboundConfig
.
starts_with
(
"
misc
"
))
else
if
(
outboundConfig
.
starts_with
(
"
dynport
"
))
ptrOutbound
=
nullptr
;
// TODO
ptrOutbound
=
nullptr
;
// TODO
else
else
throw
std
::
invalid_argument
(
"Unknown protocol in outboundConfig "
+
outboundConfig
);
throw
std
::
invalid_argument
(
"Unknown protocol in outboundConfig "
+
outboundConfig
);
...
...
This diff is collapsed.
Click to expand it.
src/protocols/
misc
.hpp
→
src/protocols/
dynport
.hpp
+
2
−
3
View file @
221ccbe3
...
@@ -10,11 +10,10 @@ namespace Protocols {
...
@@ -10,11 +10,10 @@ namespace Protocols {
public:
public:
virtual
loadConfig
(
string
config
)
override
{
virtual
loadConfig
(
string
config
)
override
{
auto
ar
=
rlib
::
string
(
config
).
split
(
'@'
);
// Also works for ipv6.
auto
ar
=
rlib
::
string
(
config
).
split
(
'@'
);
// Also works for ipv6.
if
(
ar
.
size
()
!=
4
)
if
(
ar
.
size
()
!=
3
)
throw
std
::
invalid_argument
(
"Wrong parameter string for protocol 'misc'. Example: plain@fe00:1e10:ce95:1@1080-3080
@MyPassword
"
);
throw
std
::
invalid_argument
(
"Wrong parameter string for protocol 'misc'. Example: plain@fe00:1e10:ce95:1@1080-3080"
);
listenAddr
=
ar
[
1
];
listenAddr
=
ar
[
1
];
// listenPort = ar[2].as<uint16_t>();
// listenPort = ar[2].as<uint16_t>();
psk
=
ar
[
3
];
// listen these ports.
// listen these ports.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment