-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warnings, possible linter failures and typos (#223)
* Fix warnings: unhandled errors * Fix warnings: redundant type conversions * Fix warnings: errors comparison and type conversion * Fix warnings: redundant function arguments * Fix warnings: built-in function name collisions * Fix warnings: typos in comments * Fix warnings: potential nil pointer dereference * Fix warnings: mixed value and pointer receivers * Fix warnings: remove deprecated weekrand.Seed() call * Fix possible linter failures: imports order * Fix README: caddyfile support * Fix README: sort matchers and handlers by name * Fix warnings: one more typo in comments * Fix warnings: potential nil pointer dereference, optimized
- Loading branch information
Showing
39 changed files
with
212 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import ( | |
"testing" | ||
|
||
"github.com/caddyserver/caddy/v2/caddytest" | ||
|
||
_ "github.com/mholt/caddy-l4" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ff5d983
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.
@vnxme Is that something you could look into? Probably just a simple fix.
ff5d983
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.
@lxhao61 I haven't tested
proxy_protocol
option ofproxy
handler below, buttls sni
matcher works fine for me with the latest caddy-l4 and caddy v2.8.4. My working config:Could you elaborate on what isn't working for you or somehow describe the bug? If you remove
proxy_protocol
option, does it work?ff5d983
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.
@vnxme @mholt Sorry, I misjudged the problem. The correct judgment is:
SNI configuration
andUDP forwarding configuration
coexist, and neither can be used normally. The example is as follows:After deleting the
UDP forwarding configuration
, theSNI configuration
can be used.ff5d983
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.
@lxhao61 Are you saying that the config you posted above (with both TCP and UDP listening the same port) used to work before this commit, but won't work after it?
ff5d983
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.
@vnxme Yes.