便捷的文件分享工具

Go File

描述

文件分享工具,可用于局域网内分享文件,直接跑满本地带宽。

特点

  1. 无需配置环境,仅单个可执行文件,直接双击即可开始使用。
  2. 自动打开浏览器,分享文件快人一步。
  3. 提供二维码,可供移动端扫描下载文件,告别手动输入文件。

使用方法

直接双击即可使用,默认端口为 3000,默认的 token(用于删除文件时验证身份)为 token

如果需要修改端口,加参数即可:./go-file.exe -port 80 -token private

演示

desktop mobile

其他

Node.js 版本在此

Owner
Comments
  • I got a error!

    I got a error!

    wsl run go-file 报错! /mnt/d/private/go-file/go-file.exe -port 80 -token private -path /mnt/d/Share 2021/12/09 11:15:47 [Recovery] 2021/12/09 - 11:15:47 panic recovered: runtime error: invalid memory address or nil pointer dereference C:/Program Files/Go/src/runtime/panic.go:212 (0xa3f104) C:/Program Files/Go/src/runtime/signal_windows.go:239 (0xa3efbe) C:/Users/song/Documents/Projects/Go/go-file/controller.go:44 (0xf36dbb) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xea36e1) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0xea36c7) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xea27c6) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0xea2785) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xe98e6f) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0xe98e55) C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0xe98944) C:/Program Files/Go/src/net/http/server.go:2887 (0xcb4f89) C:/Program Files/Go/src/net/http/server.go:1952 (0xcb030c) C:/Program Files/Go/src/runtime/asm_amd64.s:1371 (0xa5ef20) 不能访问自定义的共享文件夹

  • 不支持arm吗?

    不支持arm吗?

    root@cubieboard:~/share# ./go-file 2022/07/13 13:08:58 Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

    启用cgo编译报错,

    [root@VM-4-3-centos go-file]# CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -o arm32_cgo

    runtime/cgo

    gcc: error: unrecognized command line option '-marm' [root@VM-4-3-centos go-file]# CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -o arm64_cgo

    runtime/cgo

    gcc_arm64.S: Assembler messages: gcc_arm64.S:28: Error: no such instruction: stp x29,x30,[sp,' gcc_arm64.S:32: Error: too many memory references formov' gcc_arm64.S:34: Error: no such instruction: stp x19,x20,[sp,' gcc_arm64.S:37: Error: no such instruction:stp x21,x22,[sp,' gcc_arm64.S:40: Error: no such instruction: stp x23,x24,[sp,' gcc_arm64.S:43: Error: no such instruction:stp x25,x26,[sp,' gcc_arm64.S:46: Error: no such instruction: stp x27,x28,[sp,' gcc_arm64.S:50: Error: too many memory references formov' gcc_arm64.S:51: Error: too many memory references for mov' gcc_arm64.S:52: Error: too many memory references formov' gcc_arm64.S:54: Error: no such instruction: blr x20' gcc_arm64.S:55: Error: no such instruction:blr x19' gcc_arm64.S:57: Error: no such instruction: ldp x27,x28,[sp,' gcc_arm64.S:60: Error: no such instruction:ldp x25,x26,[sp,' gcc_arm64.S:63: Error: no such instruction: ldp x23,x24,[sp,' gcc_arm64.S:66: Error: no such instruction:ldp x21,x22,[sp,' gcc_arm64.S:69: Error: no such instruction: ldp x19,x20,[sp,' gcc_arm64.S:72: Error: no such instruction:ldp x29,x30,[sp],' [root@VM-4-3-centos go-file]#

  • 作者大大您好,请教一下如何加Path参数?

    作者大大您好,请教一下如何加Path参数?

    作者大大您好,我在网上无意间发现您制作的这个软件,感觉非常好用,但是在共享文件夹时遇到了问题。 “如果需要分享文件夹,加 path 参数:./go-file.exe -path ./this/is/a/path” 请问这个加path参数是在哪添加的,在百度上我没有搜索到相关答案,所以在这里提交疑问,希望能得到您的答复,感谢🤝

  • ⬆️ Bump github.com/gin-gonic/gin from 1.6.2 to 1.7.0

    ⬆️ Bump github.com/gin-gonic/gin from 1.6.2 to 1.7.0

    Bumps github.com/gin-gonic/gin from 1.6.2 to 1.7.0.

    Release notes

    Sourced from github.com/gin-gonic/gin's releases.

    Release v1.7.0

    BUGFIXES

    • fix compile error from #2572 (#2600)
    • fix: print headers without Authorization header on broken pipe (#2528)
    • fix(tree): reassign fullpath when register new node (#2366)

    ENHANCEMENTS

    • Support params and exact routes without creating conflicts (#2663)
    • chore: improve render string performance (#2365)
    • Sync route tree to httprouter latest code (#2368)
    • chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa (#2375)
    • chore(performance): improve countParams (#2378)
    • Remove some functions that have the same effect as the bytes package (#2387)
    • update:SetMode function (#2321)
    • remove a unused type SecureJSONPrefix (#2391)
    • Add a redirect sample for POST method (#2389)
    • Add CustomRecovery builtin middleware (#2322)
    • binding: avoid 2038 problem on 32-bit architectures (#2450)
    • Prevent panic in Context.GetQuery() when there is no Request (#2412)
    • Add GetUint and GetUint64 method on gin.context (#2487)
    • update content-disposition header to MIME-style (#2512)
    • reduce allocs and improve the render WriteString (#2508)
    • implement ".Unwrap() error" on Error type (#2525) (#2526)
    • Allow bind with a map[string]string (#2484)
    • chore: update tree (#2371)
    • Support binding for slice/array obj [Rewrite] (#2302)
    • basic auth: fix timing oracle (#2609)
    • Add mixed param and non-param paths (port of httprouter#329) (#2663)
    • feat(engine): add trustedproxies and remoteIP (#2632)

    Improve performance

    ENHANCEMENTS

    • Improve performance: Change *sync.RWMutex to sync.RWMutex in context. #2351
    Changelog

    Sourced from github.com/gin-gonic/gin's changelog.

    Gin v1.7.0

    BUGFIXES

    • fix compile error from #2572 (#2600)
    • fix: print headers without Authorization header on broken pipe (#2528)
    • fix(tree): reassign fullpath when register new node (#2366)

    ENHANCEMENTS

    • Support params and exact routes without creating conflicts (#2663)
    • chore: improve render string performance (#2365)
    • Sync route tree to httprouter latest code (#2368)
    • chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa (#2375)
    • chore(performance): improve countParams (#2378)
    • Remove some functions that have the same effect as the bytes package (#2387)
    • update:SetMode function (#2321)
    • remove a unused type SecureJSONPrefix (#2391)
    • Add a redirect sample for POST method (#2389)
    • Add CustomRecovery builtin middleware (#2322)
    • binding: avoid 2038 problem on 32-bit architectures (#2450)
    • Prevent panic in Context.GetQuery() when there is no Request (#2412)
    • Add GetUint and GetUint64 method on gin.context (#2487)
    • update content-disposition header to MIME-style (#2512)
    • reduce allocs and improve the render WriteString (#2508)
    • implement ".Unwrap() error" on Error type (#2525) (#2526)
    • Allow bind with a map[string]string (#2484)
    • chore: update tree (#2371)
    • Support binding for slice/array obj [Rewrite] (#2302)
    • basic auth: fix timing oracle (#2609)
    • Add mixed param and non-param paths (port of httprouter#329) (#2663)
    • feat(engine): add trustedproxies and remoteIP (#2632)

    Gin v1.6.3

    ENHANCEMENTS

    • Improve performance: Change *sync.RWMutex to sync.RWMutex in context. #2351
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Explorer 处理部分文件时发生错误

    Explorer 处理部分文件时发生错误

    例如:C++ Primer 第5版.pdf

    [GIN] 2022/05/17 - 21:46:01 | 500 |      4.4349ms |  172.21.224.224 | GET      "/explorer?path=C%2B%2B+Primer+%E7%AC%AC5%E7%89%88.pdf"
    
    
    2022/05/17 21:46:14 [Recovery] 2022/05/17 - 21:46:14 panic recovered:
    runtime error: invalid memory address or nil pointer dereference
    C:/Program Files/Go/src/runtime/panic.go:212 (0xa8f104)
    C:/Program Files/Go/src/runtime/signal_windows.go:239 (0xa8efbe)
    C:/Users/song/Documents/Projects/Go/go-file/controller.go:44 (0xf86dbb)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xef36e1)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0xef36c7)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xef27c6)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0xef2785)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0xee8e6f)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0xee8e55)
    C:/Users/song/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0xee8944)
    C:/Program Files/Go/src/net/http/server.go:2887 (0xd04f89)
    C:/Program Files/Go/src/net/http/server.go:1952 (0xd0030c)
    C:/Program Files/Go/src/runtime/asm_amd64.s:1371 (0xaaef20)
    
  • 首页上传的文件分配一个次级目录吧

    首页上传的文件分配一个次级目录吧

    1.现在首页上传的文件,直接update或者分享的文件夹根目录下,导致根目录很混乱。 能不能给放到一个次级目录,如update/default。 2.添加个复制链接按钮吧,方便分享给别人,现在都是点开下载复制的 ps:试了下系统管理的修改底部信息,发现就是插入一段HTML代码,那是不是可以把首页弄成可以自定义的HTML或markdown页面呢。 我现在是把 那个gotext 用ifream弄到底部了🤣