diff --git a/.gitignore b/.gitignore index b7cc296..fb40bac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .vocode/ .idea/ *.log +*.sh +*.yaml +*.yml +dist/ \ No newline at end of file diff --git a/README.md b/README.md index 89f692b..328fca7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ In the future, it will provide two-way transfer, folder synchronization and othe Installation --- -please download the executable file from the Release page +Please download the executable file from the [*Release*](https://github.com/XiaCo/ucp/releases) page Example --- @@ -29,6 +29,7 @@ firewall-cmd --reload Usage --- +> About **-speed**: It is recommended to set to a lower bandwidth download speed between the two ends to obtain a more stable and high-speed transmission, which will be optimized later ``` Usage of transfer: -cp string @@ -42,7 +43,7 @@ Usage of transfer: file sender listen to binding address (default "0.0.0.0:56789") -speed uint It is recommended to fill in the minimum bandwidth download / upload speed at both ends - unit: Kb/s + unit: KB/s (default 1024) ``` diff --git a/README.zh.md b/README.zh.md index 7cebc9e..8a65199 100644 --- a/README.zh.md +++ b/README.zh.md @@ -8,7 +8,7 @@ What is ucp? Installation --- -请从Release页面下载对应可执行文件 +请从[*Release*](https://github.com/XiaCo/ucp/releases)页面下载对应可执行文件 Example --- @@ -28,6 +28,7 @@ firewall-cmd --reload Usage --- +> 关于 **-speed** 参数:建议设置成两端之间较低的带宽下载速度,以获得较为稳定高速的传输,后期将会优化 ``` Usage of transfer: -cp string @@ -41,7 +42,7 @@ Usage of transfer: file sender listen to binding address (default "0.0.0.0:56789") -speed uint It is recommended to fill in the minimum bandwidth download / upload speed at both ends - unit: Kb/s + unit: KB/s (default 1024) ``` diff --git a/main.go b/main.go index 3d4a696..b20cd57 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ func init() { serverAddr = flag.String("saddr", "0.0.0.0:56789", "file sender listen to binding address") cp = flag.String("cp", "", "format: \"remoteIP:port filePath savePath\"\nexample: \"22.22.22.22:56789 /home/test.zip ./test.zip\"") - speed = flag.Uint64("speed", 1024, "It is recommended to fill in the minimum bandwidth download / upload speed at both ends\nunit: Kb/s\n") + speed = flag.Uint64("speed", 1024, "It is recommended to fill in the minimum bandwidth download / upload speed at both ends\nunit: KB/s\n") flag.Usage = func() { fmt.Println("ucp version: 1.0.0\nA transport tool using UDP underlying protocol") diff --git a/protocol/udpfile.go b/protocol/udpfile.go index dd05e15..9d2ed54 100644 --- a/protocol/udpfile.go +++ b/protocol/udpfile.go @@ -420,7 +420,7 @@ func (c *ClientTask) PrintDownloadProgress(wg *sync.WaitGroup) { wg.Done() } -func (c *ClientTask) Pull(speedKbS uint64) { +func (c *ClientTask) Pull(speedKBS uint64) { // 向服务端请求数据,并接收数据 wg := sync.WaitGroup{} wg.Add(1) @@ -436,7 +436,7 @@ func (c *ClientTask) Pull(speedKbS uint64) { fmt.Println("Ready to receive data") break loop case <-requestRetry.C: - reqErr := c.requestInit(speedKbS) + reqErr := c.requestInit(speedKBS) if reqErr != nil { Logger.Println(reqErr) }