Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
go-mmproxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
go-mmproxy
Commits
ba73ce8d
Commit
ba73ce8d
authored
6 years ago
by
Konrad Zemek
Browse files
Options
Downloads
Patches
Plain Diff
Note that --listeners>1 only works for Linux 3.9+.
parent
ab9f257a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-3
1 addition, 3 deletions
README.md
main.go
+2
-1
2 additions, 1 deletion
main.go
with
3 additions
and
4 deletions
README.md
+
1
−
3
View file @
ba73ce8d
...
@@ -51,15 +51,13 @@ Usage of ./go-mmproxy:
...
@@ -51,15 +51,13 @@ Usage of ./go-mmproxy:
-l string
-l string
Adress the proxy listens on (default "0.0.0.0:8443")
Adress the proxy listens on (default "0.0.0.0:8443")
-listeners int
-listeners int
Number of listener sockets that will be opened for the listen address (default 1)
Number of listener sockets that will be opened for the listen address
(Linux 3.9+)
(default 1)
-mark int
-mark int
The mark that will be set on outbound packets
The mark that will be set on outbound packets
-v int
-v int
0 - no logging of individual connections
0 - no logging of individual connections
1 - log errors occuring in individual connections
1 - log errors occuring in individual connections
2 - log all state changes of individual connections
2 - log all state changes of individual connections
```
```
Example invocation:
Example invocation:
...
...
This diff is collapsed.
Click to expand it.
main.go
+
2
−
1
View file @
ba73ce8d
...
@@ -42,7 +42,8 @@ func init() {
...
@@ -42,7 +42,8 @@ func init() {
flag
.
IntVar
(
&
verbose
,
"v"
,
0
,
`0 - no logging of individual connections
flag
.
IntVar
(
&
verbose
,
"v"
,
0
,
`0 - no logging of individual connections
1 - log errors occuring in individual connections
1 - log errors occuring in individual connections
2 - log all state changes of individual connections`
)
2 - log all state changes of individual connections`
)
flag
.
IntVar
(
&
listeners
,
"listeners"
,
1
,
"Number of listener sockets that will be opened for the listen address"
)
flag
.
IntVar
(
&
listeners
,
"listeners"
,
1
,
"Number of listener sockets that will be opened for the listen address (Linux 3.9+)"
)
}
}
func
readRemoteAddrPROXYv2
(
conn
net
.
Conn
,
ctrlBuf
[]
byte
)
(
net
.
Addr
,
net
.
Addr
,
[]
byte
,
error
)
{
func
readRemoteAddrPROXYv2
(
conn
net
.
Conn
,
ctrlBuf
[]
byte
)
(
net
.
Addr
,
net
.
Addr
,
[]
byte
,
error
)
{
...
...
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