支持自动生成local_port #76

This commit is contained in:
lwch
2023-11-29 18:22:13 +08:00
parent 6b98db06b6
commit 73cd22c412
13 changed files with 57 additions and 32 deletions

View File

@@ -30,7 +30,7 @@ func (p *program) shellCreate(mgr *rule.Mgr, conn *conn.Conn, msg *network.Msg)
create := msg.GetCreq()
tn := mgr.GetLinked(create.GetName(), msg.GetFrom())
if tn == nil {
tn = shell.New(global.Rule{
tn = shell.New(&global.Rule{
Name: create.GetName(),
Target: msg.GetFrom(),
Type: "shell",
@@ -57,7 +57,7 @@ func (p *program) vncCreate(confDir string, mgr *rule.Mgr, conn *conn.Conn, msg
create := msg.GetCreq()
tn := mgr.GetLinked(create.GetName(), msg.GetFrom())
if tn == nil {
tn = vnc.New(global.Rule{
tn = vnc.New(&global.Rule{
Name: create.GetName(),
Target: msg.GetFrom(),
Type: "vnc",
@@ -92,7 +92,7 @@ func (p *program) codeCreate(confDir string, mgr *rule.Mgr, conn *conn.Conn, msg
create := msg.GetCreq()
tn := mgr.GetLinked(create.GetName(), msg.GetFrom())
if tn == nil {
tn = code.New(global.Rule{
tn = code.New(&global.Rule{
Name: create.GetName(),
Target: msg.GetFrom(),
Type: "code-server",