Go File
描述
文件分享工具,可用于局域网内分享文件,直接跑满本地带宽。
特点
- 无需配置环境,仅单个可执行文件,直接双击即可开始使用。
- 自动打开浏览器,分享文件快人一步。
- 提供二维码,可供移动端扫描下载文件,告别手动输入文件。
使用方法
直接双击即可使用,默认端口为 3000
,默认的 token(用于删除文件时验证身份)为 token
。
如果需要修改端口,加参数即可:./go-file.exe -port 80 -token private
。
文件分享工具,可用于局域网内分享文件,直接跑满本地带宽。
直接双击即可使用,默认端口为 3000
,默认的 token(用于删除文件时验证身份)为 token
。
如果需要修改端口,加参数即可:./go-file.exe -port 80 -token private
。
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)
不能访问自定义的共享文件夹
[email protected]:~/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编译报错,
[[email protected] go-file]# CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -o arm32_cgo
gcc: error: unrecognized command line option '-marm' [[email protected] go-file]# CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -o arm64_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 for
mov'
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 for
mov'
gcc_arm64.S:51: Error: too many memory references for mov' gcc_arm64.S:52: Error: too many memory references for
mov'
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],'
[[email protected] go-file]#
作者大大您好,我在网上无意间发现您制作的这个软件,感觉非常好用,但是在共享文件夹时遇到了问题。 “如果需要分享文件夹,加 path 参数:./go-file.exe -path ./this/is/a/path” 请问这个加path参数是在哪添加的,在百度上我没有搜索到相关答案,所以在这里提交疑问,希望能得到您的答复,感谢🤝
Bumps github.com/gin-gonic/gin from 1.6.2 to 1.7.0.
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
tosync.RWMutex
in context. #2351
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
tosync.RWMutex
in context. #2351
d496f64
bump to v1.7.0 version (#2672)bfc8ca2
feat(engine): add trustedproxies and remoteIP (#2632)f3de813
Add mixed param and non-param paths (port of httprouter#329) (#2663)a331dc6
chore: remove duplicate test 'assert.Equal' (#2617)ed6f85c
build: convert to go:build directives (#2664)1bdf86b
Remove the tedious named return value (#2620)e899771
chore: Deleted spaces (#2622)b01605b
basic auth: fix timing oracle (#2609)46ddd42
Fixes to the graceful shutdown example (#2552)f4bc259
fix error gin support min Go version (#2584)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
.
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 languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
例如: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弄到底部了🤣
Full Changelog: https://github.com/songquanpeng/go-file/compare/v0.4.5...v0.4.6
Source code(tar.gz)-v /absolute/path:/data
来保存镜像中的数据了。这是基于 Bulma 的最后一个大版本,下个大版本将基于 Gin Template 完全重构前后端,敬请期待。
Source code(tar.gz)
--version
来打印版本号了。
此版本为 v0.2 的最后一个版本,项目即将大规模重构,敬请期待。
Source code(tar.gz)现在支持通过环境变量设置端口号,使其可被顺利部署到 Heroku 上。
Source code(tar.gz)支持最基本的文件上传,搜索,下载以及删除操作。