fix(ci): set Listener ID via embedded BaseModel in export/share
This commit is contained in:
1 parent
a2d7048bbd
commit
615b199888
3 files changed
+3
-4
No files matched your search
@@ -1031,7 +1031,7 @@ func applyClientSkipCertVerify(p, opts map[string]interface{}, connectHost strin
|
||||
break
|
||||
}
|
||||
}
|
||||
l := models.Listener{ID: listenerID}
|
||||
l := models.Listener{BaseModel: models.BaseModel{ID: listenerID}}
|
||||
profile := export.BuildProfileFromConfig(l, connectHost, cfg)
|
||||
if profile.SkipCert {
|
||||
p["skip-cert-verify"] = true
|
||||
|
||||
@@ -43,7 +43,7 @@ func TestBuildProfileFromConfigEmitsIPSNI(t *testing.T) {
|
||||
ip := "85.149.212.214"
|
||||
pem := testIPCertPEM(t, ip)
|
||||
l := models.Listener{
|
||||
ID: 1,
|
||||
BaseModel: models.BaseModel{ID: 1},
|
||||
AccessSNI: "www.bing.com", // must NOT win over IP SAN
|
||||
Port: "43829",
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"golang.org/x/crypto/curve25519"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/kazeyukiro/3m-ui/backend/internal/certutil"
|
||||
"github.com/kazeyukiro/3m-ui/backend/internal/database/models"
|
||||
"github.com/kazeyukiro/3m-ui/backend/internal/export"
|
||||
"github.com/kazeyukiro/3m-ui/backend/internal/netutil"
|
||||
@@ -897,7 +896,7 @@ func resolveShareTLS(in ShareInput, configuredSNI, host string, explicitSkip boo
|
||||
}
|
||||
// Rebuild a minimal listener view so export.BuildProfile owns certstore + path PEM.
|
||||
l := models.Listener{
|
||||
ID: in.Node.ID,
|
||||
BaseModel: models.BaseModel{ID: in.Node.ID},
|
||||
PublicHost: in.Node.PublicHost,
|
||||
PublicPort: in.Node.PublicPort,
|
||||
Port: in.Node.Port,
|
||||
|
||||
Reference in new issue
Block a user