From 04747a231e9729efb7495e22bd484daf1f5cfdc4 Mon Sep 17 00:00:00 2001 From: Ralf <54005327+RalfHacker@users.noreply.github.com> Date: Wed, 30 Jul 2025 19:42:47 +0300 Subject: [PATCH] Update connector.go --- AdaptixServer/core/connector/connector.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/AdaptixServer/core/connector/connector.go b/AdaptixServer/core/connector/connector.go index 0a7b40cf..feaaf9e7 100644 --- a/AdaptixServer/core/connector/connector.go +++ b/AdaptixServer/core/connector/connector.go @@ -95,11 +95,12 @@ type Teamserver interface { } type TsConnector struct { - Port int - Hash string - Endpoint string - Cert string - Key string + Interface string + Port int + Hash string + Endpoint string + Cert string + Key string Engine *gin.Engine teamserver Teamserver @@ -138,6 +139,7 @@ func NewTsConnector(ts Teamserver, tsProfile profile.TsProfile, tsResponse profi var connector = new(TsConnector) connector.Engine = gin.New() connector.teamserver = ts + connector.Interface = tsProfile.Interface connector.Port = tsProfile.Port connector.Endpoint = tsProfile.Endpoint connector.Hash = krypt.SHA256([]byte(tsProfile.Password)) @@ -197,7 +199,7 @@ func NewTsConnector(ts Teamserver, tsProfile profile.TsProfile, tsResponse profi } func (tc *TsConnector) Start(finished *chan bool) { - host := fmt.Sprintf(":%d", tc.Port) + host := fmt.Sprintf("%s:%d", tc.Interface, tc.Port) err := tc.Engine.RunTLS(host, tc.Cert, tc.Key) if err != nil { logs.Error("", "Failed to start HTTP Server: "+err.Error())