Browse Source

修改

master
453530270@qq.com 2 years ago
parent
commit
5556d2e836
  1. 10
      xgfs/main.go
  2. 2
      xgfs/web/download.tmpl

10
xgfs/main.go

@ -25,12 +25,14 @@ func initConfig(c *cli.Context) error {
// 接收端 管理上传
func receiveClient() error {
//接收者角色
go discovery.Send(discovery.Receiver)
// go discovery.Send(discovery.Receiver)
//udp 模式监听
go discovery.Listen(discovery.Sender, "")
// go discovery.Listen(discovery.Sender, "")
address := fmt.Sprintf("http://%s:%s", config.G.LocalIP, config.G.Port)
fmt.Printf("Server address: %s\n", address)
// address := fmt.Sprintf("http://%s:%s", config.G.LocalIP, config.G.Port)
// fmt.Printf("Server address: %s\n", address)
// 注释上面的局域网广播
fmt.Println("xtfs run as receive role...")
http.HandleFunc("/", handler.ReceiveHandler)
http.Handle("/static/", http.StripPrefix("/static/",

2
xgfs/web/download.tmpl

@ -98,7 +98,7 @@
</head>
<body>
<div class="container">
<p>{{ .DeviceName }}</p>
<p>主机名:{{ .DeviceName }}</p>
<hr>
{{ if .IsDir }}
<h2>{{ .DownloadPath }}</h2>

Loading…
Cancel
Save