mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-19 15:54:14 +01:00
feat(route): add bind address support for TCP/UDP routes
- Introduced a new `Bind` field in the route configuration to specify the address to listen on for TCP and UDP routes. - Defaulted the bind address to "0.0.0.0" if not provided. - Enhanced validation to ensure the bind address is a valid IP. - Updated stream initialization to use the correct network type (tcp4/tcp6 or udp4/udp6) based on the bind address. - Refactored stream creation functions to accept the network type as a parameter.
This commit is contained in:
@@ -4189,6 +4189,11 @@
|
||||
"x-nullable": false,
|
||||
"x-omitempty": false
|
||||
},
|
||||
"bind": {
|
||||
"description": "for TCP and UDP routes, bind address to listen on",
|
||||
"type": "string",
|
||||
"x-nullable": true
|
||||
},
|
||||
"container": {
|
||||
"description": "Docker only",
|
||||
"allOf": [
|
||||
@@ -5327,6 +5332,11 @@
|
||||
"x-nullable": false,
|
||||
"x-omitempty": false
|
||||
},
|
||||
"bind": {
|
||||
"description": "for TCP and UDP routes, bind address to listen on",
|
||||
"type": "string",
|
||||
"x-nullable": true
|
||||
},
|
||||
"container": {
|
||||
"description": "Docker only",
|
||||
"allOf": [
|
||||
|
||||
@@ -879,6 +879,10 @@ definitions:
|
||||
type: string
|
||||
alias:
|
||||
type: string
|
||||
bind:
|
||||
description: for TCP and UDP routes, bind address to listen on
|
||||
type: string
|
||||
x-nullable: true
|
||||
container:
|
||||
allOf:
|
||||
- $ref: '#/definitions/Container'
|
||||
@@ -1495,6 +1499,10 @@ definitions:
|
||||
type: string
|
||||
alias:
|
||||
type: string
|
||||
bind:
|
||||
description: for TCP and UDP routes, bind address to listen on
|
||||
type: string
|
||||
x-nullable: true
|
||||
container:
|
||||
allOf:
|
||||
- $ref: '#/definitions/Container'
|
||||
|
||||
Reference in New Issue
Block a user