├── LICENSE ├── README.md ├── UI ├── assets │ ├── css │ │ ├── announcement-board.css │ │ ├── delete-dialog.css │ │ ├── global-style.css │ │ ├── makedir-dialog.css │ │ ├── property-dialog.css │ │ ├── rename-dialog.css │ │ ├── search-dialog.css │ │ └── upload-dialog.css │ ├── icons │ │ ├── 7z.svg │ │ ├── BACK.svg │ │ ├── FOLDER.svg │ │ ├── NULL.svg │ │ ├── apk.svg │ │ ├── avi.svg │ │ ├── bat.svg │ │ ├── bin.svg │ │ ├── bmp.svg │ │ ├── c.svg │ │ ├── cfg.svg │ │ ├── config.svg │ │ ├── cpp.svg │ │ ├── css.svg │ │ ├── csv.svg │ │ ├── dat.svg │ │ ├── db.svg │ │ ├── dll.svg │ │ ├── doc.svg │ │ ├── docx.svg │ │ ├── exe.svg │ │ ├── gif.svg │ │ ├── gitignore.svg │ │ ├── go.svg │ │ ├── gz.svg │ │ ├── html.svg │ │ ├── ico.svg │ │ ├── ini.svg │ │ ├── iso.svg │ │ ├── java.svg │ │ ├── jpeg.svg │ │ ├── jpg.svg │ │ ├── js.svg │ │ ├── json.svg │ │ ├── lnk.svg │ │ ├── log.svg │ │ ├── m.svg │ │ ├── manifest.svg │ │ ├── md.svg │ │ ├── mlx.svg │ │ ├── mov.svg │ │ ├── mp3.svg │ │ ├── mp4.svg │ │ ├── otf.svg │ │ ├── pak.svg │ │ ├── pdf.svg │ │ ├── pkg.svg │ │ ├── png.svg │ │ ├── ppt.svg │ │ ├── pptx.svg │ │ ├── psd.svg │ │ ├── py.svg │ │ ├── rar.svg │ │ ├── sh.svg │ │ ├── svg.svg │ │ ├── tar.svg │ │ ├── tex.svg │ │ ├── ts.svg │ │ ├── ttc.svg │ │ ├── ttf.svg │ │ ├── txt.svg │ │ ├── wav.svg │ │ ├── webm.svg │ │ ├── webp.svg │ │ ├── woff.svg │ │ ├── woff2.svg │ │ ├── xls.svg │ │ ├── xlsx.svg │ │ ├── xml.svg │ │ ├── xz.svg │ │ ├── yaml.svg │ │ ├── yml.svg │ │ └── zip.svg │ ├── images │ │ ├── MORE.svg │ │ ├── about.svg │ │ ├── announcement.svg │ │ ├── copy.svg │ │ ├── create.svg │ │ ├── delete.svg │ │ ├── download.svg │ │ ├── move.svg │ │ ├── paste.svg │ │ ├── place.svg │ │ ├── property.svg │ │ ├── rename.svg │ │ ├── search.svg │ │ ├── select.svg │ │ ├── terminal.svg │ │ └── upload.svg │ └── js │ │ ├── announcement-board.js │ │ ├── api-docs.js │ │ ├── batch-download.js │ │ ├── copy-file.js │ │ ├── delete-file.js │ │ ├── display-file-list.js │ │ ├── make-directory.js │ │ ├── move-file.js │ │ ├── rename-file.js │ │ ├── search-file.js │ │ ├── select-all-checkbox.js │ │ ├── upload-file-copy.js │ │ ├── upload-file.js │ │ └── view-file-property.js ├── docs.html ├── index.html └── login.html ├── app.go ├── build ├── appicon.png ├── darwin │ ├── Info.dev.plist │ └── Info.plist └── windows │ ├── info.json │ ├── installer │ ├── project.nsi │ ├── tmp │ │ └── MicrosoftEdgeWebview2Setup.exe │ └── wails_tools.nsh │ └── wails.exe.manifest ├── docs ├── .nojekyll ├── _coverpage.md ├── _navbar.md ├── _sidebar.md ├── _sidebar │ ├── Blog.md │ ├── DownloadInTerminal.md │ ├── Instruction.md │ ├── Linux.md │ ├── Open.md │ ├── POST-API.md │ ├── PublicNetwork.md │ ├── README.md │ ├── Windows10+.md │ ├── Windows7.md │ ├── macOS.md │ └── sync.md ├── assets │ ├── img │ │ ├── 8888.png │ │ ├── DNS-Parse.png │ │ ├── DNS.png │ │ ├── Firewall.png │ │ ├── GUI.png │ │ ├── HTML-HelloWorld.png │ │ ├── HelloWorld.png │ │ ├── Huawei.png │ │ ├── IPv4.png │ │ ├── LocalTransfer.png │ │ ├── OK.png │ │ ├── Server.png │ │ ├── aesthetic.png │ │ ├── curl.png │ │ ├── demo-500.png │ │ ├── demo-GET.png │ │ ├── demo-HelloWorld.png │ │ ├── demo-Tencent.png │ │ ├── demo-avatar.png │ │ ├── demo-browser.png │ │ ├── demo-cpolar-result.png │ │ ├── demo-cpolar.png │ │ ├── demo-curl.png │ │ ├── demo-custom.png │ │ ├── demo-danger.png │ │ ├── demo-del-all.png │ │ ├── demo-dir.png │ │ ├── demo-download.png │ │ ├── demo-echo.png │ │ ├── demo-eg.png │ │ ├── demo-firewall.png │ │ ├── demo-folder-result.png │ │ ├── demo-folder.png │ │ ├── demo-git.png │ │ ├── demo-mac.png │ │ ├── demo-macOS.png │ │ ├── demo-mkdir.png │ │ ├── demo-nohup.png │ │ ├── demo-orphan.png │ │ ├── demo-pdf.png │ │ ├── demo-pdflatex.png │ │ ├── demo-ping1.png │ │ ├── demo-ping2.png │ │ ├── demo-ping3.png │ │ ├── demo-pipe.png │ │ ├── demo-post-result.png │ │ ├── demo-post-warning.png │ │ ├── demo-post.png │ │ ├── demo-public.png │ │ ├── demo-select.png │ │ ├── demo-src.png │ │ ├── demo-ssh.png │ │ ├── demo-switch.png │ │ ├── demo-tex.png │ │ ├── demo-unknown.png │ │ ├── demo-unknown2.png │ │ ├── demo-uploaded.png │ │ ├── demo.png │ │ ├── iPhone.png │ │ ├── logo.png │ │ ├── new.png │ │ ├── nginx.png │ │ ├── nohup.png │ │ ├── old.png │ │ ├── public.png │ │ ├── record.png │ │ ├── requests-sidebar.png │ │ ├── rm.png │ │ ├── see.jpeg │ │ ├── template.png │ │ ├── unexpected.png │ │ ├── upload.png │ │ ├── version.png │ │ └── web.jpeg │ └── js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery.toTop.min.js │ │ └── sw.js └── index.html ├── frontend ├── dist │ └── index.html ├── index.html ├── package.json ├── src │ ├── main.js │ └── style.css └── wailsjs │ ├── go │ └── main │ │ ├── APP.d.ts │ │ └── APP.js │ └── runtime │ ├── package.json │ ├── runtime.d.ts │ └── runtime.js ├── gui.go ├── handler.go ├── images ├── GUI.png ├── app.png ├── cli.png └── screenshot.png ├── types.go ├── utils.go └── wails.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Zolio Marling 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /UI/assets/css/announcement-board.css: -------------------------------------------------------------------------------- 1 | .announcement-board { 2 | display: none; 3 | position: fixed; 4 | top: 50%; 5 | left: 50%; 6 | transform: translate(-50%, -50%); 7 | z-index: 1; 8 | width: 320px; 9 | height: 300px; 10 | background-color: white; 11 | border: 1px solid #ccc; 12 | border-radius: 10px; 13 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 14 | overflow-y: scroll; 15 | padding-top: 1em; 16 | padding-bottom: 1em; 17 | padding-left: 2em; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | 22 | [contenteditable] { 23 | border: 3px solid #ccc; 24 | outline: none; 25 | border-radius: 0px; 26 | margin-top: 20px; 27 | margin-bottom: 20px; 28 | box-shadow: 0 5px 5px rgba(128, 128, 128, 0.5); 29 | resize: vertical; 30 | background-color: #f9f9f9; 31 | color: #333; 32 | width: 90%; 33 | min-height: 120px; 34 | box-sizing: border-box; 35 | /* word-wrap: break-word; 36 | overflow-wrap: break-word; 37 | white-space: pre-wrap; */ 38 | -webkit-touch-callout: auto; 39 | -webkit-user-select: auto; 40 | -khtml-user-select: auto; 41 | -moz-user-select: auto; 42 | -ms-user-select: auto; 43 | user-select: auto; 44 | } 45 | 46 | [contenteditable]:focus { 47 | border-color: #b39ddb; 48 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); 49 | } -------------------------------------------------------------------------------- /UI/assets/css/delete-dialog.css: -------------------------------------------------------------------------------- 1 | .delete-dialog { 2 | display: none; 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | width: 100%; 7 | height: 100%; 8 | background-color: rgba(0, 0, 0, 0.5); 9 | justify-content: center; 10 | align-items: center; 11 | z-index: 2; 12 | } 13 | .delete-dialog-content { 14 | position: fixed; 15 | background-color: white; 16 | padding: 20px; 17 | border-radius: 15px; 18 | text-align: center; 19 | top: 50%; 20 | left: 50%; 21 | width: 300px; 22 | transform: translate(-50%, -50%); 23 | } 24 | .delete-dialog-cancel { 25 | background-color: #ccc; 26 | margin: 0 25px; 27 | padding: 8px 20px; 28 | border: none; 29 | border-radius: 4px; 30 | cursor: pointer; 31 | font-size: 15px; 32 | } 33 | .delete-dialog-ok { 34 | background-color: #ff4d4f; 35 | color: white; 36 | margin: 0 25px; 37 | padding: 8px 20px; 38 | border: none; 39 | border-radius: 4px; 40 | cursor: pointer; 41 | font-size: 15px; 42 | } 43 | .delete-dialog-cancel:hover, .delete-dialog-ok:hover { 44 | transition: transform 0.3s ease; 45 | transform: scale(1.2); 46 | } -------------------------------------------------------------------------------- /UI/assets/css/makedir-dialog.css: -------------------------------------------------------------------------------- 1 | .makedir-dialog { 2 | display: none; 3 | position: fixed; 4 | top: 50%; 5 | left: 50%; 6 | transform: translate(-50%, -50%); 7 | z-index: 1; 8 | width: 300px; 9 | height: 160px; 10 | background-color: white; 11 | border: 1px solid #ccc; 12 | border-radius: 10px; 13 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 14 | overflow-x: hidden; 15 | overflow-y: hidden; 16 | padding-top: 1em; 17 | padding-bottom: 1em; 18 | padding-left: 2em; 19 | } 20 | .makedir-dialog-content { 21 | position: fixed; 22 | background-color: white; 23 | padding: 20px; 24 | border-radius: 15px; 25 | text-align: center; 26 | top: 50%; 27 | left: 50%; 28 | width: 300px; 29 | transform: translate(-50%, -50%); 30 | } 31 | .makedir-dialog-cancel { 32 | background-color: #ccc; 33 | margin: 0 25px; 34 | padding: 8px 20px; 35 | border: none; 36 | border-radius: 4px; 37 | cursor: pointer; 38 | font-size: 15px; 39 | } 40 | .makedir-dialog-ok { 41 | background-color: #4fb558; 42 | color: white; 43 | margin: 0 25px; 44 | padding: 8px 20px; 45 | border: none; 46 | border-radius: 4px; 47 | cursor: pointer; 48 | font-size: 15px; 49 | } 50 | .makedir-dialog-cancel:hover, .makedir-dialog-ok:hover { 51 | transition: transform 0.3s ease; 52 | transform: scale(1.2); 53 | } 54 | .makedir-dialog-content input[type="text"] { 55 | font-family: 'en', 'zh', 'Times New Roman', sans-serif; 56 | font-weight: bold; 57 | padding: 10px 15px; 58 | border: 1px solid #ccc; 59 | border-radius: 4px; 60 | line-height: 1.5; 61 | width: calc(100% - 32px); 62 | box-sizing: border-box; 63 | margin-bottom: 20px; 64 | outline: none; 65 | &:focus { 66 | border-color: #5c9cff; 67 | box-shadow: 0 0 5px rgba(92, 156, 255, 0.5); 68 | } 69 | &::placeholder { 70 | color: #aaa; 71 | } 72 | transition: border-color 0.3s, box-shadow 0.3s; 73 | } -------------------------------------------------------------------------------- /UI/assets/css/property-dialog.css: -------------------------------------------------------------------------------- 1 | .property-dialog { 2 | display: none; 3 | position: fixed; 4 | top: 50%; 5 | left: 50%; 6 | transform: translate(-50%, -50%); 7 | z-index: 1; 8 | width: 300px; 9 | height: 160px; 10 | background-color: white; 11 | border: 1px solid #ccc; 12 | border-radius: 10px; 13 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 14 | overflow-x: hidden; 15 | overflow-y: hidden; 16 | padding-top: 1em; 17 | padding-bottom: 1em; 18 | padding-left: 2em; 19 | } -------------------------------------------------------------------------------- /UI/assets/css/rename-dialog.css: -------------------------------------------------------------------------------- 1 | .rename-dialog { 2 | display: none; 3 | position: fixed; 4 | top: 50%; 5 | left: 50%; 6 | transform: translate(-50%, -50%); 7 | z-index: 1; 8 | width: 300px; 9 | height: 200px; 10 | background-color: white; 11 | border: 1px solid #ccc; 12 | border-radius: 10px; 13 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 14 | overflow-x: hidden; 15 | overflow-y: hidden; 16 | padding-top: 1em; 17 | padding-bottom: 1em; 18 | padding-left: 2em; 19 | } 20 | .rename-dialog-content { 21 | position: fixed; 22 | background-color: white; 23 | padding: 20px; 24 | border-radius: 15px; 25 | text-align: center; 26 | top: 50%; 27 | left: 50%; 28 | width: 300px; 29 | transform: translate(-50%, -50%); 30 | } 31 | .rename-dialog-cancel { 32 | background-color: #ccc; 33 | margin: 0 25px; 34 | padding: 8px 20px; 35 | border: none; 36 | border-radius: 4px; 37 | cursor: pointer; 38 | font-size: 15px; 39 | transition: transform 0.3s ease; 40 | } 41 | .rename-dialog-ok { 42 | background-color: #4fb558; 43 | color: white; 44 | margin: 0 25px; 45 | padding: 8px 20px; 46 | border: none; 47 | border-radius: 4px; 48 | cursor: pointer; 49 | font-size: 15px; 50 | transition: transform 0.3s ease; 51 | } 52 | .rename-dialog-cancel:hover, .rename-dialog-ok:hover { 53 | transform: scale(1.2); 54 | } 55 | .rename-dialog-content input[type="text"] { 56 | font-family: 'en', 'zh', 'Times New Roman', sans-serif; 57 | font-weight: bold; 58 | padding: 10px 15px; 59 | border: 1px solid #ccc; 60 | border-radius: 4px; 61 | line-height: 1.5; 62 | width: calc(100% - 32px); 63 | box-sizing: border-box; 64 | margin-bottom: 20px; 65 | outline: none; 66 | &:focus { 67 | border-color: #5c9cff; 68 | box-shadow: 0 0 5px rgba(92, 156, 255, 0.5); 69 | } 70 | &::placeholder { 71 | color: #aaa; 72 | } 73 | transition: border-color 0.3s, box-shadow 0.3s; 74 | } -------------------------------------------------------------------------------- /UI/assets/css/upload-dialog.css: -------------------------------------------------------------------------------- 1 | .upload-dialog { 2 | display: none; 3 | position: fixed; 4 | top: 50%; 5 | left: 50%; 6 | transform: translate(-50%, -50%); 7 | z-index: 1; 8 | width: 300px; 9 | height: 250px; 10 | background-color: white; 11 | border: 1px solid #ccc; 12 | border-radius: 10px; 13 | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 14 | overflow-x: hidden; 15 | overflow-y: hidden; 16 | padding-top: 1em; 17 | padding-bottom: 1em; 18 | padding-left: 2em; 19 | } 20 | .upload-dialog-content { 21 | position: fixed; 22 | background-color: white; 23 | padding: 20px; 24 | border-radius: 15px; 25 | text-align: center; 26 | top: 50%; 27 | left: 50%; 28 | width: 300px; 29 | transform: translate(-50%, -50%); 30 | } 31 | .upload-dialog-cancel { 32 | background-color: #ccc; 33 | margin: 0 25px; 34 | padding: 8px 20px; 35 | border: none; 36 | border-radius: 4px; 37 | cursor: pointer; 38 | font-size: 15px; 39 | } 40 | .upload-dialog-ok { 41 | background-color: #4fb558; 42 | color: white; 43 | margin: 0 25px; 44 | padding: 8px 20px; 45 | border: none; 46 | border-radius: 4px; 47 | cursor: pointer; 48 | font-size: 15px; 49 | } 50 | .upload-dialog-cancel:hover, .upload-dialog-ok:hover { 51 | transition: transform 0.3s ease; 52 | transform: scale(1.2); 53 | } 54 | .drop-zone { 55 | width: 98%; 56 | height: 120px; 57 | border: 2px dashed #ccc; 58 | border-radius: 10px; 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | margin: 20px 0; 63 | transition: all 0.3s ease; 64 | overflow: hidden; 65 | } 66 | .drop-zone.dragover { 67 | background-color: #f0f8ff; 68 | border-color: #4fb558; 69 | } 70 | .drop-zone-content { 71 | text-align: center; 72 | width: 100%; 73 | padding: 0 20px; 74 | } 75 | .drop-zone-content img { 76 | width: 48px; 77 | height: 48px; 78 | margin-bottom: 15px; 79 | } 80 | .drop-zone-upload-button { 81 | width: 290px; 82 | height: 120px; 83 | padding-top: 20px; 84 | background-color: white; 85 | color: black; 86 | border: none; 87 | border-radius: 8px; 88 | cursor: pointer; 89 | display: flex; 90 | flex-direction: column; 91 | align-items: center; 92 | margin: 0 auto; 93 | } 94 | .drop-zone-upload-button:hover { 95 | background-color: #ccc; 96 | } 97 | .drop-zone-upload-button span { 98 | display: block; 99 | width: 100%; 100 | text-align: center; 101 | overflow: hidden; 102 | text-overflow: ellipsis; 103 | } -------------------------------------------------------------------------------- /UI/assets/icons/7z.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/BACK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/FOLDER.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/NULL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/apk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/avi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/bin.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/bmp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/config.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/cpp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/css.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/dat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/db.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/dll.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/doc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/docx.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/exe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/gif.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/gitignore.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/go.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/gz.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/html.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ico.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ini.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/java.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/jpeg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/jpg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/js.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/lnk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/log.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/m.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/manifest.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/md.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/mlx.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/mov.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/mp3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/mp4.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/otf.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/pak.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/pdf.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/png.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ppt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/pptx.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/psd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/py.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/rar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/sh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/svg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/tar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ts.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ttc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/ttf.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/txt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/wav.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/webm.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/webp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/woff.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/woff2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/xls.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/xlsx.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/xml.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/xz.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/yml.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/icons/zip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/MORE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/about.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/create.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/delete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/move.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/paste.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/place.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/property.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/rename.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/select.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/terminal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/images/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UI/assets/js/announcement-board.js: -------------------------------------------------------------------------------- 1 | const announcement_board = document.querySelector('.announcement-board'); 2 | 3 | 4 | document.querySelector('.nav-item img[src="/UI/assets/images/announcement.svg"]').parentElement.addEventListener('click', () => { 5 | if (announcement_board.style.display === 'block') { 6 | SendAnnouncement(); 7 | announcement_board.style.display = 'none'; 8 | } else { 9 | ViewAnnouncement(); 10 | } 11 | }); 12 | 13 | 14 | announcement_board.addEventListener('click', (event) => { 15 | if (!event.target.closest('#contenteditable')) { 16 | SendAnnouncement(); 17 | announcement_board.style.display = 'none'; 18 | } 19 | }); 20 | 21 | 22 | async function SendAnnouncement() { 23 | const content = document.getElementById('contenteditable').innerHTML; 24 | try { 25 | const response = await fetch('/api/edit-announcement/', { 26 | method: 'POST', 27 | headers: { 28 | 'Content-Type': 'application/json', 29 | }, 30 | body: JSON.stringify({ Content: content }), 31 | }); 32 | if (!response.ok) { 33 | throw new Error(`[* HTTP ${response.status}], 建议刷新重试.`); 34 | } 35 | } catch (error) { 36 | alert("将公告板的内容发送到后端异常: " + error.message); 37 | return; 38 | } 39 | } 40 | 41 | 42 | async function ViewAnnouncement() { 43 | try { 44 | return await fetch('/api/announcement-content/', { 45 | method: 'POST', 46 | headers: { 47 | 'Accept': 'application/json' 48 | }, 49 | }) 50 | .then(response => response.json()) 51 | .then(data => { 52 | announcement_board.innerHTML = ` 53 |
${data.Content}
54 | `; 55 | announcement_board.style.display = 'block'; 56 | }) 57 | } catch (error) { 58 | alert("从后端获取公告板内容异常: " + error.message); 59 | return; 60 | } 61 | } -------------------------------------------------------------------------------- /UI/assets/js/api-docs.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.more-item img[src="/UI/assets/images/about.svg"]').parentElement.addEventListener('click', () => {window.open("/docs/", "_blank");}); -------------------------------------------------------------------------------- /UI/assets/js/batch-download.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.more-item img[src="/UI/assets/images/download.svg"]').parentElement.addEventListener('click', BatchDownload); 2 | 3 | 4 | async function BatchDownload() { 5 | const selected_checkboxs = document.querySelectorAll('.file-item input[type="checkbox"]:checked'); 6 | const selected_files = Array.from(selected_checkboxs).map(c => { 7 | const file_name = c.parentElement.querySelector('.file-name').textContent; 8 | return { 9 | Path: CURRENT_DIR === '.' ? file_name : `${CURRENT_DIR}/${file_name}`, 10 | CurrentDir: CURRENT_DIR 11 | }; 12 | }); 13 | 14 | if (selected_files.length === 0) { 15 | alert('请勾选需要下载的文件😊'); 16 | return; 17 | } 18 | 19 | try { 20 | const response = await fetch('/api/batch-download/', { 21 | method: 'POST', 22 | headers: { 23 | 'Content-Type': 'application/json', 24 | }, 25 | body: JSON.stringify(selected_files) 26 | }); 27 | if (!response.ok) { 28 | throw new Error(`[* HTTP ${response.status}], 建议刷新重试.`); 29 | } 30 | 31 | const blob = await response.blob(); 32 | 33 | const a = document.createElement('a'); 34 | a.download = 'archive.zip'; 35 | a.href = window.URL.createObjectURL(blob); 36 | a.click(); 37 | URL.revokeObjectURL(a.href); 38 | a.remove(); 39 | } catch (error) { 40 | alert("下载文件异常: " + error.message); 41 | return; 42 | } 43 | } -------------------------------------------------------------------------------- /UI/assets/js/delete-file.js: -------------------------------------------------------------------------------- 1 | const delete_dialog = document.querySelector('.delete-dialog'); 2 | 3 | 4 | document.querySelector('.nav-item img[src="/UI/assets/images/delete.svg"]').parentElement.addEventListener('click', CreateDeleteDialog); 5 | 6 | 7 | async function DeleteSelectedFile() { 8 | const selected_checkboxs = document.querySelectorAll('.file-item input[type="checkbox"]:checked'); 9 | const selected_files = Array.from(selected_checkboxs).map(c => { 10 | const file_name = c.parentElement.querySelector('.file-name').textContent; 11 | return {Path: CURRENT_DIR === '.' ? file_name : `${CURRENT_DIR}/${file_name}`}; 12 | }); 13 | 14 | if (selected_files.length === 0) { 15 | alert('请勾选需要删除的文件😊'); 16 | return; 17 | } 18 | 19 | try { 20 | const response = await fetch('/api/delete-file/', { 21 | method: 'POST', 22 | headers: { 23 | 'Content-Type': 'application/json', 24 | }, 25 | body: JSON.stringify(selected_files) 26 | }); 27 | if (!response.ok) { 28 | throw new Error(`[* HTTP ${response.status}], 建议刷新重试.`); 29 | } 30 | delete_dialog.style.display = 'none'; 31 | UpdateFileList(CURRENT_DIR); 32 | } catch (error) { 33 | alert("删除文件异常: " + error.message); 34 | delete_dialog.style.display = 'none'; 35 | return; 36 | } 37 | } 38 | 39 | 40 | function CreateDeleteDialog() { 41 | const selected_checkboxs = document.querySelectorAll('.file-item input[type="checkbox"]:checked'); 42 | const selected_files = Array.from(selected_checkboxs).map(c => { 43 | const file_name = c.parentElement.querySelector('.file-name').textContent; 44 | return {Path: CURRENT_DIR === '.' ? file_name : `${CURRENT_DIR}/${file_name}`}; 45 | }); 46 | 47 | if (selected_files.length === 0) { 48 | alert('请勾选需要删除的文件😊'); 49 | return; 50 | } 51 | 52 | delete_dialog.style.display = 'block'; 53 | 54 | const content = document.querySelector('.delete-dialog'); 55 | content.innerHTML = ` 56 |
57 |

确定删除么?无法恢复的哦~

58 | 59 | 60 |
61 | `; 62 | 63 | document.querySelector('.delete-dialog-cancel').addEventListener('click', () => { 64 | delete_dialog.style.display = 'none'; 65 | }); 66 | 67 | document.querySelector('.delete-dialog-ok').addEventListener('click', DeleteSelectedFile); 68 | } -------------------------------------------------------------------------------- /UI/assets/js/make-directory.js: -------------------------------------------------------------------------------- 1 | document.querySelector('.more-item img[src="/UI/assets/images/create.svg"]').parentElement.addEventListener('click', MakedirDialog); 2 | 3 | 4 | function MakedirDialog() { 5 | const dialog = document.querySelector('.makedir-dialog'); 6 | dialog.innerHTML = ` 7 |
8 |
9 | 10 | 11 |
12 | ` 13 | dialog.style.display = 'block'; 14 | 15 | document.querySelector('.makedir-dialog-cancel').addEventListener('click', () => { 16 | dialog.style.display = 'none'; 17 | }); 18 | 19 | document.querySelector('.makedir-dialog-ok').addEventListener('click', async () => { 20 | try { 21 | const value = document.getElementById('makedir').value; 22 | const response = await fetch('/api/make-directory/', { 23 | method: 'POST', 24 | headers: { 25 | 'Content-Type': 'application/json', 26 | }, 27 | body: JSON.stringify({"Path": value, "CurrentDir": CURRENT_DIR}) 28 | }); 29 | if (!response.ok) { 30 | throw new Error(`[* HTTP ${response.status}], 建议刷新重试.`); 31 | } 32 | UpdateFileList(CURRENT_DIR); 33 | dialog.style.display = 'none'; 34 | } catch (error) { 35 | alert("创建文件夹异常: " + error.message); 36 | dialog.style.display = 'none'; 37 | return; 38 | } 39 | }); 40 | } -------------------------------------------------------------------------------- /UI/assets/js/select-all-checkbox.js: -------------------------------------------------------------------------------- 1 | function BindSelectAllCheckboxEvent() { 2 | const select_all_checkbox_btn = document.querySelector('.nav-item img[src="/UI/assets/images/select.svg"]').parentElement; 3 | const select_all_checkbox_text = select_all_checkbox_btn.querySelector('span'); 4 | const checkboxes = document.querySelectorAll('.file-item input[type="checkbox"]'); 5 | 6 | function UpdateNavigationSelectButtonText(is_all_selected) { 7 | select_all_checkbox_text.textContent = is_all_selected ? '取消' : '全选'; 8 | } 9 | 10 | function IsAllSelected() { 11 | const is_all_selected = Array.from(checkboxes).every(c => c.checked); 12 | UpdateNavigationSelectButtonText(is_all_selected); 13 | } 14 | 15 | select_all_checkbox_btn.addEventListener('click', () => { 16 | const is_all_selected = Array.from(checkboxes).every(c => c.checked); 17 | checkboxes.forEach(c => { 18 | c.checked = !is_all_selected; 19 | }); 20 | UpdateNavigationSelectButtonText(!is_all_selected); 21 | }); 22 | 23 | checkboxes.forEach(c => { 24 | c.addEventListener('change', IsAllSelected); 25 | }); 26 | 27 | IsAllSelected(); 28 | } 29 | 30 | 31 | document.addEventListener('DOMContentLoaded', () => { 32 | BindSelectAllCheckboxEvent(); 33 | const file_content = document.querySelector('.file-content'); 34 | const observer = new MutationObserver(() => { 35 | BindSelectAllCheckboxEvent(); 36 | }); 37 | observer.observe(file_content, { 38 | childList: true, 39 | subtree: true 40 | }); 41 | }); -------------------------------------------------------------------------------- /UI/assets/js/view-file-property.js: -------------------------------------------------------------------------------- 1 | const property_dialog = document.querySelector('.property-dialog'); 2 | 3 | 4 | property_dialog.addEventListener('click', () => { 5 | property_dialog.style.display = 'none'; 6 | }); 7 | 8 | 9 | document.querySelector('.nav-item img[src="/UI/assets/images/property.svg"]').parentElement.addEventListener('click', ViewFileProperty); 10 | 11 | 12 | 13 | async function ViewFileProperty() { 14 | const selected_checkboxs = document.querySelectorAll('.file-item input[type="checkbox"]:checked'); 15 | const selected_files = Array.from(selected_checkboxs).map(c => { 16 | const file_name = c.parentElement.querySelector('.file-name').textContent; 17 | return { 18 | Path: CURRENT_DIR === '.' ? file_name : `${CURRENT_DIR}/${file_name}` 19 | }; 20 | }); 21 | if (selected_files.length === 0) { 22 | alert('请勾选查看属性的文件😊'); 23 | return; 24 | } 25 | 26 | const content = document.querySelector('.property-dialog'); 27 | content.innerHTML = ``; 28 | property_dialog.style.display = 'block'; 29 | 30 | try { 31 | const response = await fetch('/api/file-property/', { 32 | method: 'POST', 33 | headers: { 34 | 'Content-Type': 'application/json', 35 | }, 36 | body: JSON.stringify(selected_files) 37 | }); 38 | if (!response.ok) { 39 | throw new Error(`[* HTTP ${response.status}], 建议刷新重试.`); 40 | } 41 | DisplayFileInfo(await response.json()); 42 | } catch (error) { 43 | alert("获取文件属性异常: " + error.message); 44 | } 45 | } 46 | 47 | 48 | function DisplayFileInfo(FILE_PROPERTY) { 49 | const content = document.querySelector('.property-dialog'); 50 | content.innerHTML = ` 51 |

文件个数:${FILE_PROPERTY.FileCount}

52 |

累计大小:${FILE_PROPERTY.SumSize}

53 |

修改时间:${FILE_PROPERTY.ModifiedTime}
${FILE_PROPERTY.AgoTime}

54 | `; 55 | } -------------------------------------------------------------------------------- /UI/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Go Transfer Login 7 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /app.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "net/http" 6 | "runtime" 7 | "os/exec" 8 | ) 9 | 10 | 11 | type APP struct { 12 | ctx context.Context 13 | } 14 | 15 | 16 | func NewApp() *APP { 17 | return &APP{} 18 | } 19 | 20 | 21 | func (app *APP) startup(ctx context.Context) { 22 | app.ctx = ctx 23 | } 24 | 25 | 26 | func (app *APP) SynchronizeSettings(data map[string]interface{}) { 27 | HOST_IPv4 = data["ipAddress"].(string) 28 | HOST_PORT = data["port"].(string) 29 | SHARE_DIR = data["shareFolder"].(string) 30 | UPLOAD_DIR = data["savePath"].(string) 31 | MAX_SIZE = data["maxSize"].(string) 32 | LOGIN_PASSWORD = data["password"].(string) 33 | UPLOAD_STATUS = data["enableUpload"].(bool) 34 | DELETE_STATUS = data["enableDelete"].(bool) 35 | RENAME_STATUS = data["enableRename"].(bool) 36 | SEARCH_STATUS = data["enableSearch"].(bool) 37 | ANNOUNCEMENT_STATUS = data["enableBoard"].(bool) 38 | MKDIR_STATUS = data["enableMkdir"].(bool) 39 | COPY_STATUS = data["enableCopy"].(bool) 40 | MOVE_STATUS = data["enableMove"].(bool) 41 | 42 | USER_LOCK = map[string]bool{"localhost+curl": false, "127.0.0.1+curl": false} 43 | 44 | if IS_RUNNING { 45 | UpdateShareHandler() 46 | SERVER.Shutdown(context.TODO()) 47 | SERVER = &http.Server{Addr: HOST_IPv4 + ":" + HOST_PORT} 48 | go func() { SERVER.ListenAndServe() }() 49 | } else { 50 | UpdateShareHandler() 51 | } 52 | } 53 | 54 | 55 | func (app *APP) SynchronizeServer(status bool) { 56 | if status { 57 | IS_RUNNING = true 58 | SERVER = &http.Server{Addr: HOST_IPv4 + ":" + HOST_PORT} 59 | go func() { SERVER.ListenAndServe() }() 60 | 61 | url := "http://" + HOST_IPv4 + ":" + HOST_PORT 62 | switch runtime.GOOS { 63 | case "windows": 64 | cmd := exec.Command("cmd", "/c", "start", url) 65 | cmd.Run() 66 | case "darwin": 67 | cmd := exec.Command("open", url) 68 | cmd.Run() 69 | case "linux": 70 | cmd := exec.Command("xdg-open", url) 71 | cmd.Run() 72 | default: 73 | println("未知操作系统, 自行打开浏览器.") 74 | } 75 | } else { 76 | IS_RUNNING = false 77 | SERVER.Shutdown(context.TODO()) 78 | } 79 | } 80 | 81 | 82 | func (app *APP) InitConfig() map[string]string { 83 | return map[string]string{"ip": HOST_IPv4, "port": HOST_PORT, "share_dir": SHARE_DIR, "upload_dir": UPLOAD_DIR, "max_size": MAX_SIZE, "password": LOGIN_PASSWORD} 84 | } -------------------------------------------------------------------------------- /build/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/build/appicon.png -------------------------------------------------------------------------------- /build/darwin/Info.dev.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundlePackageType 5 | APPL 6 | CFBundleName 7 | {{.Info.ProductName}} 8 | CFBundleExecutable 9 | {{.OutputFilename}} 10 | CFBundleIdentifier 11 | com.wails.{{.Name}} 12 | CFBundleVersion 13 | {{.Info.ProductVersion}} 14 | CFBundleGetInfoString 15 | {{.Info.Comments}} 16 | CFBundleShortVersionString 17 | {{.Info.ProductVersion}} 18 | CFBundleIconFile 19 | iconfile 20 | LSMinimumSystemVersion 21 | 10.13.0 22 | NSHighResolutionCapable 23 | true 24 | NSHumanReadableCopyright 25 | {{.Info.Copyright}} 26 | {{if .Info.FileAssociations}} 27 | CFBundleDocumentTypes 28 | 29 | {{range .Info.FileAssociations}} 30 | 31 | CFBundleTypeExtensions 32 | 33 | {{.Ext}} 34 | 35 | CFBundleTypeName 36 | {{.Name}} 37 | CFBundleTypeRole 38 | {{.Role}} 39 | CFBundleTypeIconFile 40 | {{.IconName}} 41 | 42 | {{end}} 43 | 44 | {{end}} 45 | {{if .Info.Protocols}} 46 | CFBundleURLTypes 47 | 48 | {{range .Info.Protocols}} 49 | 50 | CFBundleURLName 51 | com.wails.{{.Scheme}} 52 | CFBundleURLSchemes 53 | 54 | {{.Scheme}} 55 | 56 | CFBundleTypeRole 57 | {{.Role}} 58 | 59 | {{end}} 60 | 61 | {{end}} 62 | NSAppTransportSecurity 63 | 64 | NSAllowsLocalNetworking 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /build/darwin/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundlePackageType 5 | APPL 6 | CFBundleName 7 | {{.Info.ProductName}} 8 | CFBundleExecutable 9 | {{.OutputFilename}} 10 | CFBundleIdentifier 11 | com.wails.{{.Name}} 12 | CFBundleVersion 13 | {{.Info.ProductVersion}} 14 | CFBundleGetInfoString 15 | {{.Info.Comments}} 16 | CFBundleShortVersionString 17 | {{.Info.ProductVersion}} 18 | CFBundleIconFile 19 | iconfile 20 | LSMinimumSystemVersion 21 | 10.13.0 22 | NSHighResolutionCapable 23 | true 24 | NSHumanReadableCopyright 25 | {{.Info.Copyright}} 26 | {{if .Info.FileAssociations}} 27 | CFBundleDocumentTypes 28 | 29 | {{range .Info.FileAssociations}} 30 | 31 | CFBundleTypeExtensions 32 | 33 | {{.Ext}} 34 | 35 | CFBundleTypeName 36 | {{.Name}} 37 | CFBundleTypeRole 38 | {{.Role}} 39 | CFBundleTypeIconFile 40 | {{.IconName}} 41 | 42 | {{end}} 43 | 44 | {{end}} 45 | {{if .Info.Protocols}} 46 | CFBundleURLTypes 47 | 48 | {{range .Info.Protocols}} 49 | 50 | CFBundleURLName 51 | com.wails.{{.Scheme}} 52 | CFBundleURLSchemes 53 | 54 | {{.Scheme}} 55 | 56 | CFBundleTypeRole 57 | {{.Role}} 58 | 59 | {{end}} 60 | 61 | {{end}} 62 | 63 | 64 | -------------------------------------------------------------------------------- /build/windows/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "fixed": { 3 | "file_version": "{{.Info.ProductVersion}}" 4 | }, 5 | "info": { 6 | "0000": { 7 | "ProductVersion": "{{.Info.ProductVersion}}", 8 | "CompanyName": "{{.Info.CompanyName}}", 9 | "FileDescription": "{{.Info.ProductName}}", 10 | "LegalCopyright": "{{.Info.Copyright}}", 11 | "ProductName": "{{.Info.ProductName}}", 12 | "Comments": "{{.Info.Comments}}" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /build/windows/installer/tmp/MicrosoftEdgeWebview2Setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/build/windows/installer/tmp/MicrosoftEdgeWebview2Setup.exe -------------------------------------------------------------------------------- /build/windows/wails.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true/pm 12 | permonitorv2,permonitor 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_coverpage.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # **Local Transfer** 4 | 5 | [下载发行版](https://github.com/Illusionna/LocalTransfer/releases) 6 | [开始阅读](?id=简介) -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | 1. 简介 2 | - 1.1. 这是什么? 3 | - 1.2. 怎么去下载软件? 4 | - 1.3. 一些答疑 5 | 6 | 2. 快速开始 7 | - [2.1. 在 Windows 10 + 上运行](_sidebar/Windows10+.md) 8 | - [2.2. 在 Windows 7 上运行](_sidebar/Windows7.md) 9 | - [2.3. 在 Linux 上运行](_sidebar/Linux.md) 10 | - [2.4. 在 macOS 上运行](_sidebar/macOS.md) 11 | 12 | 3. 高级进阶使用 13 | - [3.1. 如何操作搜索框的指令集](_sidebar/Instruction.md) 14 | - [3.2. 终端怎么去下载文件?](_sidebar/DownloadInTerminal.md) 15 | - [3.3. 如何发送 POST 请求](_sidebar/POST-API.md) 16 | - [3.4. 公网(互联网)上怎么使用?](_sidebar/PublicNetwork.md) 17 | - [3.5. 搭建一个静态博客](_sidebar/Blog.md) 18 | 19 | 4. 开源同步 20 | - [4.1. 开源](_sidebar/Open.md) 21 | - [4.2. 同步](_sidebar/sync.md) -------------------------------------------------------------------------------- /docs/_sidebar/Linux.md: -------------------------------------------------------------------------------- 1 | 参考“**2.2. 在 Windows 7 上运行**”教程,下载 Linux-LocalTransfer.zip 发行版压缩包,或者下载 GitHub 源码压缩包(解压后进入 "`src`" 目录)。 2 | 3 | 一般的 Linux 发行版自带 Python3 解释器,所以执行: 4 | 5 | > ```Bash 6 | > python3 main.py 7 | > ``` 8 | 9 | > [!Danger] 10 | > 源码运行依赖的 Python 解释器版本至少高于 3.7.0 11 | 12 | 参考“**2.4. 在 macOS 上运行**”的软链接方式,更加高效地使用 "`WebServer.sh`" 脚本。 -------------------------------------------------------------------------------- /docs/_sidebar/PublicNetwork.md: -------------------------------------------------------------------------------- 1 | ## 3.4.1. 内网穿透 2 | 3 | 局域网内文件互传是 Local Transfer 的初衷,但有时候我们可能需要**公网互传文件**,好比我在北京,你在深圳,那么就需要将 "`Local`" Transfer 变成 "`Global`" Transfer,先介绍内网穿透技术。 4 | 5 | 内网穿透,通俗来说,就是让本地的网络接入互联网,需要借助一些内网穿透工具,例如 "`cpolar`" 软件,你可以在它的官网下载:https://www.cpolar.com 6 | 7 | 根据 "`cpolar`" 官网教程,先注册一个账号,再购买免费的通道,最后授权验证。 8 | 9 | > [!TIP] 10 | > 启动 Local Transfer 的 WebServer 服务,再用 `cpolar` 穿透套接字。 11 | > ```PowerShell 12 | > cpolar http [socket] 13 | > ``` 14 | 15 |
16 | Oops? 17 | Oops? 18 |
19 | 20 | "`cpolar`" 启动后会提供你 HTTP 和 HTTPS 两条通道,这样你就可以使用公网访问到 "`Global`" Transfer 啦~ 。◕‿◕。 21 | 22 | > [!WARNING|label:Important] 23 | > 例如,使用终端 GET 请求从内网穿透的公网上下载文件。 24 | > ```Bash 25 | > curl https://53b6379b.r22.cpolar.top/main.pdf -o main.pdf 26 | > ``` 27 | 28 | ## 3.4.2. 云服务器 29 | 30 | 内网穿透只是应急措施,因为你总不能一直把自己的电脑开着,而且如果自己电脑有重要文件,那么将内网穿透到公网是存在被恶意攻击的风险。因此,使用公网服务器就会绕开这些问题,例如将 Local Transfer 部署到腾讯云的轻量级服务器(免费试用一个月)。 31 | 32 |
33 | Oops? 34 |
35 | 36 | 将你的目光聚焦于四个红色框,第一个 "`211.159.167.205`" 是公网 IPv4,第二个是“运行中”,第三个是“Linux-Ubuntu 电脑的配置”,第四个是防火墙。在云服务器的**防火墙**添加一条记录,开放 "`8888`" 端口。 37 | 38 |
39 | Oops? 40 |
41 | 42 | 然后登录你的云服务器,可以通过腾讯云浏览器前端网页接入终端,也可以通过 "`ssh`" 接入终端。例如,我已经在腾讯云服务器上创建了一个叫 "`ubuntu`" 的用户,且该用户密码为 "`1234567890`",那么只需要执行指令: 43 | 44 | ```PowerShell 45 | ssh ubuntu@211.159.167.205 46 | ``` 47 | 48 |
49 | Oops? 50 |
51 | 52 | 参考“**2.3. 在 Linux 上运行**”教程,使用 "`git`" 下载源代码(或者在自己电脑上开启 Local Transfer,再使用 "`cpolar`" 内网穿透,然后在云服务器终端 GET 请求下载源码压缩包),进入 "`src`" 文件夹,再启动后台运行 Local Transfer 程序。 53 | 54 | ```Bash 55 | git clone https://github.com/Illusionna/LocalTransfer.git 56 | cd src 57 | ``` 58 | 59 | ```Bash 60 | nohup python3 main.py -port 8888 61 | ``` 62 | 63 |
64 | Oops? 65 |
66 | 67 | 此时,我们的 Local Transfer 程序已经在云服务器后台内网环境下运行起来了,并且前面也开启了 "`8888`" 端口的防火墙,所以可以通过公网访问,在设备浏览器地址栏输入公网 IPv4 和端口号 "`http://211.159.167.205:8888`",页面即可正常显示。 68 | 69 |
70 | Oops? 71 |
-------------------------------------------------------------------------------- /docs/_sidebar/README.md: -------------------------------------------------------------------------------- 1 | ## 简介 2 | 3 |
4 | Oops? 5 |
6 | 7 | ## 1.1. 这是什么? 8 | 9 | 这是一个文件传输的中心化服务器组件。通俗来讲,它能够帮助你**共享文件夹**、**互传文件**以及**操作文件**。Local Transfer 具有以下特点: 10 | 11 | > - 易于使用:便捷轻巧,一站式服务,无需任何验证、注册、登录,开箱即用; 12 | > - 开源免费:源代码公开可用,软件不收取任何费用; 13 | > - 中心化跨平台:既可以在个人电脑上使用,又可以在服务器上使用,支持 **Windows**、Linux、macOS 操作系统; 14 | > - 高度自由:支持局域网传输,也支持互联网传输,更支持你的自定义操作。 15 | 16 | **在线体验【如有国外代理,建议关闭】**:http://124.70.191.21:8888 17 | 18 | Bilibili 视频教学:https://www.bilibili.com/video/BV1MaDuY6EDJ 19 | 20 | GitHub 源码仓库:https://github.com/Illusionna/LocalTransfer 21 | 22 | ## 1.2. 怎么去下载软件? 23 | 24 | 如果你的电脑或服务器是 Windows 10、Windows 11 版本,可以**直接下载** `.exe` 程序;如果你的电脑是 Linux 或 macOS 版本,请下载相应版本的 .zip 源代码压缩包;如果你电脑是古老的 Windows 7 版本,下载 GitHub 源码仓库的 "src" 文件夹。 25 | 26 | > [!TIP] 27 | > 无论是 Windows,还是 Linux,或者 macOS,你都可以下载 "`src`" 源码。 28 | > ```Bash, PowerShell 29 | > git clone https://github.com/Illusionna/LocalTransfer.git 30 | > cd ./src 31 | > ``` 32 | 33 | > GitHub 发行版:https://github.com/Illusionna/LocalTransfer/releases 34 | > 35 | > 百度网盘:https://pan.baidu.com/s/1Lhrg5p78UlMaiDqnPjGzjg?pwd=7s3g 36 | > 37 | > QQ 群文件:728832589 38 | 39 | ## 1.3. 一些答疑 40 | 41 | > Q:只能在局域网(同一个 WIFI 或热点)下使用么? 42 | > 43 | > A:既可以在局域网内使用,也可以在公网、互联网上使用。局域网内使用是零门槛的,不过,局域网不能有 AP 隔离,此外,公网使用需要一定网络基础,最后公网的效果见 http://124.70.191.21:8888 所示。 44 | 45 | > Q:会消耗流量么? 46 | > 47 | > A:局域网内不耗流量,公网会消耗流量。 48 | 49 | > Q:软件磁盘占用空间,以及运行时内存占用大么?会产生冗余的垃圾数据不? 50 | > 51 | > A:磁盘占用空间极小,Windows 版本的 .exe 程序仅 10MB,源码压缩包也仅 3MB;运行时内存占用也很小,Windows 约 40MB,Linux 和 macOS 都约 30MB;不会产生任何冗余数据,前提是你需要清晰知晓上传文件所保存在的目录 :) 52 | 53 | > Q:文件上传、下载速度快么? 54 | > 55 | > A:速度取决于路由器、网络带宽等,Local Transfer 不会限制传输速度。 56 | 57 | > Q:工具安全吗? 58 | > 59 | > A:采取 HTTP 协议,没有 SSL/TLS 加密,不安全,别用 (づ。◕‿‿◕。)づ【开玩笑啦,不过建议在你完成传输后即时关闭程序】 60 | 61 | > Q:会不会更新太快,导致版本不兼容? 62 | > 63 | > A:就自己随便做的小玩意,有精力就更新,没精力就摆烂,确保下载最新版本即可。 64 | 65 |
66 | Oops? 67 |
-------------------------------------------------------------------------------- /docs/_sidebar/Windows10+.md: -------------------------------------------------------------------------------- 1 | ## 2.1.1. 双击 .exe 启动程序 2 | 3 | 确保你的电脑和其他设备(如手机、另一台电脑、平板、手表等)在同一个 WIFI 或热点下。 4 | 5 | 无论你是 Windows 10,还是 Windows 11 的操作系统,你都可以在任意目录下**双击** LocalTransfer 的可执行程序。程序会在 .exe 所在文件目录下自动创建 "`resources`" 文件夹,用于构建依赖资源包,并且尝试在桌面自动创建 "`DEFAULT_CACHE`" 的默认文件夹。点击启动即可打开传输服务。 6 | 7 | 为了方便,你可以将 Local Transfer 的 .exe 程序塞到你放软件的磁盘文件夹中,然后为程序创建一个**桌面快捷方式**。 8 | 9 |
10 | Oops? 11 |
12 | 13 | ## 2.1.2. 使用终端启动程序 14 | 15 | 使用命令提示符或 Windows PowerShell 执行指令: 16 | 17 | > [!NOTE] 18 | > 查看帮助文档。 19 | > ```PowerShell 20 | > C:/Users/xxxxx/Downloads/Windows-LocalTransfer.exe --help 21 | > ``` 22 | 23 | 如果你嫌弃绝对路径太长,可将 Local Transfer 程序加入到**环境变量**,这样就可以执行: 24 | 25 | > [!WARNING|label:Important] 26 | > 共享 C 盘,上传文件保存到 D 盘的 Folder 文件夹,且不启动 GUI 图形化界面。 27 | > ```PowerShell 28 | > Windows-LocalTransfer.exe -share C:\ -upload D:\Folder -nogui 29 | > ``` 30 | 31 | 你甚至可以修改可执行程序的名称,将 Windows-LocalTransfer.exe 重命名为 webserver.exe,然后执行: 32 | 33 | > [!WARNING|label:Important] 34 | > 共享 C 盘,上传文件保存到当前工作区所在目录,且上传文件不允许超过 120MB 大小。 35 | > ```PowerShell 36 | > webserver.exe -share C:\ -upload . -max 120MB 37 | > ``` 38 | 39 | 譬如,使用默认配置: 40 | 41 |
42 | Oops? 43 |
44 | 45 | ## 2.1.3. 设备上传多张照片到电脑 46 | 47 | 同一个局域网下,在设备**浏览器地址栏**搜索 `http://HOST:PORT`,譬如上图的 `http://192.168.1.102:8888`,方便起见,也可以搜索套接字 `192.168.1.102:8888`。有些浏览器自带创建二维码功能,如果设备是手机,那么扫二维码会更加方便。 48 | 49 |
50 | Oops? 51 |
52 | 53 | 选择多份文件后,点击上传即可。 54 | 55 |
56 | Oops? 57 | Oops? 58 |
59 | 60 | ## 2.1.4. 设备下载文件到本地 61 | 62 | 譬如,我使用 iPad 的 safari 浏览器,对准文件,按住不放,然后选择下载即可。 63 | 64 |
65 | Oops? 66 |
67 | 68 | ## 2.1.5. 搜索与切换目录 69 | 70 | 譬如,我将一个 "`docs`" 目录作为子文件夹放到 "`DEFAULT_CACHE`" 文件夹中,先 `CTRL + C` 关闭进程,然后重启程序服务。 71 | 72 | > [!Danger] 73 | > 倘若你不想重启 Local Transfer 程序,可在高亮搜索框输入一个空格,再按下回车键,以清空 `LRU` 缓存,实现文件刷新。 74 | 75 | 鼠标悬停显示文件信息,点击 "`~`" 符号返回共享根目录。 76 | 77 |
78 | Oops? 79 | Oops? 80 |
81 | 82 | ## 2.1.6. 限制人使用前端上传文件 83 | 84 | 在启动 Local Transfer 服务后,我可以将文件直接放到共享文件夹或上传文件夹,但除此之外,我不想让其他任何人通过前端(浏览器)上传文件。那么可以限制他们上传文件的最大大小为 1 字节,然后我只需要装作不知道 ♬(ノ゜∇゜)ノ♩,嘿嘿嘿。 85 | 86 | > ```PowerShell 87 | > webserver.exe -max "1 B" 88 | > ``` -------------------------------------------------------------------------------- /docs/_sidebar/Windows7.md: -------------------------------------------------------------------------------- 1 | Windows 7 以及 Linux 和 macOS 的发行版都是源码,因此需要依赖 `Python` 编程环境。 2 | 3 | Python 版本要求至少高于 3.7.0,如果你的电脑已经安装了 conda 环境,可执行: 4 | 5 | > [!WARNING|label:Important] 6 | > ```CMD 7 | > conda create -n aaaaa python==3.7.0 8 | > conda activate aaaaa 9 | > ``` 10 | 11 | > [!TIP] 12 | > 无论是 Windows,还是 Linux,或者 macOS,你都可以下载 "`src`" 源码。 13 | > ```CMD 14 | > git clone https://github.com/Illusionna/LocalTransfer.git 15 | > cd src 16 | > ``` 17 | 18 | 你也可以去 GitHub 源码主页下载 .zip 压缩包,解压完成后进入 "`src`" 文件夹的工作区目录。 19 | 20 |
21 | Oops? 22 |
23 | 24 | 直接执行 "`src`" 目录下的 "`main.py`" 文件即可启动服务: 25 | 26 | > ```CMD 27 | > python main.py 28 | > ``` -------------------------------------------------------------------------------- /docs/_sidebar/macOS.md: -------------------------------------------------------------------------------- 1 | 参考“**2.2. 在 Windows 7 上运行**”或““**2.3. 在 Linux 上运行**””教程,下载 macOS-LocalTransfer.zip 发行版压缩包,或者下载 GitHub 源码压缩包(解压后进入 "`src`" 目录)。 2 | 3 | > [!Danger] 4 | > 源码运行依赖的 Python 解释器版本至少高于 3.7.0,在终端使用 python + [tab键] 查看 Mac 上有哪些自带的解释器,再查看版本。 5 | > ```zsh 6 | > pyth [再按一下 Tab 键] 7 | > python3 --version 8 | > 3.12.0 9 | > ``` 10 | 11 | 在终端(如 zsh)执行指令即可启动服务: 12 | 13 | > ```zsh 14 | > python3 main.py 15 | > ``` 16 | 17 | 如果你下载的 macOS-LocalTransfer.zip 发行版,解压后你会看到一个叫 "`WebServer.sh`" 的脚本。 18 | 19 |
20 | Oops? 21 |
22 | 23 | 你可以通过**软链接**形式,将该脚本指定到另一个目录(建议另一个目录能被环境变量搜索到),譬如: 24 | 25 | > ```zsh 26 | > ln -s /Users/xxxxx/Desktop/macOS-LocalTransfer/WebServer.sh /usr/local/bin/webserver 27 | > ``` 28 | 29 | 然后你就可以随时随地方便地启动程序: 30 | 31 | > ```zsh 32 | > webserver -share /Users/xxxxx/Desktop 33 | > ``` 34 | 35 |
36 | Oops? 37 |
38 | 39 | 如果存在权限问题,可以为源脚本和链接文件都授权可读、可写、可执行: 40 | 41 | > ```zsh 42 | > chmod 777 /Users/xxxxx/Desktop/macOS-LocalTransfer/WebServer.sh 43 | > chmod 777 /usr/local/bin/webserver 44 | > ``` -------------------------------------------------------------------------------- /docs/_sidebar/sync.md: -------------------------------------------------------------------------------- 1 | > 工具源码:https://github.com/Illusionna/LocalTransfer 2 | > 3 | > 工具发行版:https://github.com/Illusionna/LocalTransfer/releases 4 | > 5 | > 工具主页:https://illusionna.github.io/LocalTransfer 6 | 7 | > 版本:第四代 -------------------------------------------------------------------------------- /docs/assets/img/8888.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/8888.png -------------------------------------------------------------------------------- /docs/assets/img/DNS-Parse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/DNS-Parse.png -------------------------------------------------------------------------------- /docs/assets/img/DNS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/DNS.png -------------------------------------------------------------------------------- /docs/assets/img/Firewall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/Firewall.png -------------------------------------------------------------------------------- /docs/assets/img/GUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/GUI.png -------------------------------------------------------------------------------- /docs/assets/img/HTML-HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/HTML-HelloWorld.png -------------------------------------------------------------------------------- /docs/assets/img/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/HelloWorld.png -------------------------------------------------------------------------------- /docs/assets/img/Huawei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/Huawei.png -------------------------------------------------------------------------------- /docs/assets/img/IPv4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/IPv4.png -------------------------------------------------------------------------------- /docs/assets/img/LocalTransfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/LocalTransfer.png -------------------------------------------------------------------------------- /docs/assets/img/OK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/OK.png -------------------------------------------------------------------------------- /docs/assets/img/Server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/Server.png -------------------------------------------------------------------------------- /docs/assets/img/aesthetic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/aesthetic.png -------------------------------------------------------------------------------- /docs/assets/img/curl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/curl.png -------------------------------------------------------------------------------- /docs/assets/img/demo-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-500.png -------------------------------------------------------------------------------- /docs/assets/img/demo-GET.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-GET.png -------------------------------------------------------------------------------- /docs/assets/img/demo-HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-HelloWorld.png -------------------------------------------------------------------------------- /docs/assets/img/demo-Tencent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-Tencent.png -------------------------------------------------------------------------------- /docs/assets/img/demo-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-avatar.png -------------------------------------------------------------------------------- /docs/assets/img/demo-browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-browser.png -------------------------------------------------------------------------------- /docs/assets/img/demo-cpolar-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-cpolar-result.png -------------------------------------------------------------------------------- /docs/assets/img/demo-cpolar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-cpolar.png -------------------------------------------------------------------------------- /docs/assets/img/demo-curl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-curl.png -------------------------------------------------------------------------------- /docs/assets/img/demo-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-custom.png -------------------------------------------------------------------------------- /docs/assets/img/demo-danger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-danger.png -------------------------------------------------------------------------------- /docs/assets/img/demo-del-all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-del-all.png -------------------------------------------------------------------------------- /docs/assets/img/demo-dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-dir.png -------------------------------------------------------------------------------- /docs/assets/img/demo-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-download.png -------------------------------------------------------------------------------- /docs/assets/img/demo-echo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-echo.png -------------------------------------------------------------------------------- /docs/assets/img/demo-eg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-eg.png -------------------------------------------------------------------------------- /docs/assets/img/demo-firewall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-firewall.png -------------------------------------------------------------------------------- /docs/assets/img/demo-folder-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-folder-result.png -------------------------------------------------------------------------------- /docs/assets/img/demo-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-folder.png -------------------------------------------------------------------------------- /docs/assets/img/demo-git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-git.png -------------------------------------------------------------------------------- /docs/assets/img/demo-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-mac.png -------------------------------------------------------------------------------- /docs/assets/img/demo-macOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-macOS.png -------------------------------------------------------------------------------- /docs/assets/img/demo-mkdir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-mkdir.png -------------------------------------------------------------------------------- /docs/assets/img/demo-nohup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-nohup.png -------------------------------------------------------------------------------- /docs/assets/img/demo-orphan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-orphan.png -------------------------------------------------------------------------------- /docs/assets/img/demo-pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-pdf.png -------------------------------------------------------------------------------- /docs/assets/img/demo-pdflatex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-pdflatex.png -------------------------------------------------------------------------------- /docs/assets/img/demo-ping1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-ping1.png -------------------------------------------------------------------------------- /docs/assets/img/demo-ping2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-ping2.png -------------------------------------------------------------------------------- /docs/assets/img/demo-ping3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-ping3.png -------------------------------------------------------------------------------- /docs/assets/img/demo-pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-pipe.png -------------------------------------------------------------------------------- /docs/assets/img/demo-post-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-post-result.png -------------------------------------------------------------------------------- /docs/assets/img/demo-post-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-post-warning.png -------------------------------------------------------------------------------- /docs/assets/img/demo-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-post.png -------------------------------------------------------------------------------- /docs/assets/img/demo-public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-public.png -------------------------------------------------------------------------------- /docs/assets/img/demo-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-select.png -------------------------------------------------------------------------------- /docs/assets/img/demo-src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-src.png -------------------------------------------------------------------------------- /docs/assets/img/demo-ssh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-ssh.png -------------------------------------------------------------------------------- /docs/assets/img/demo-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-switch.png -------------------------------------------------------------------------------- /docs/assets/img/demo-tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-tex.png -------------------------------------------------------------------------------- /docs/assets/img/demo-unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-unknown.png -------------------------------------------------------------------------------- /docs/assets/img/demo-unknown2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-unknown2.png -------------------------------------------------------------------------------- /docs/assets/img/demo-uploaded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo-uploaded.png -------------------------------------------------------------------------------- /docs/assets/img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/demo.png -------------------------------------------------------------------------------- /docs/assets/img/iPhone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/iPhone.png -------------------------------------------------------------------------------- /docs/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/logo.png -------------------------------------------------------------------------------- /docs/assets/img/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/new.png -------------------------------------------------------------------------------- /docs/assets/img/nginx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/nginx.png -------------------------------------------------------------------------------- /docs/assets/img/nohup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/nohup.png -------------------------------------------------------------------------------- /docs/assets/img/old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/old.png -------------------------------------------------------------------------------- /docs/assets/img/public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/public.png -------------------------------------------------------------------------------- /docs/assets/img/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/record.png -------------------------------------------------------------------------------- /docs/assets/img/requests-sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/requests-sidebar.png -------------------------------------------------------------------------------- /docs/assets/img/rm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/rm.png -------------------------------------------------------------------------------- /docs/assets/img/see.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/see.jpeg -------------------------------------------------------------------------------- /docs/assets/img/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/template.png -------------------------------------------------------------------------------- /docs/assets/img/unexpected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/unexpected.png -------------------------------------------------------------------------------- /docs/assets/img/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/upload.png -------------------------------------------------------------------------------- /docs/assets/img/version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/version.png -------------------------------------------------------------------------------- /docs/assets/img/web.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/docs/assets/img/web.jpeg -------------------------------------------------------------------------------- /docs/assets/js/jquery.toTop.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery.toTop.js v1.1 3 | * Developed by: MMK Jony 4 | * Fork on Github: https://github.com/mmkjony/jQuery.toTop 5 | **/ 6 | 7 | !function(o){"use strict";o.fn.toTop=function(t){var i=this,e=o(window),s=o("html, body"),n=o.extend({autohide:!0,offset:420,speed:500,position:!0,right:15,bottom:30},t);i.css({cursor:"pointer"}),n.autohide&&i.css("display","none"),n.position&&i.css({position:"fixed",right:n.right,bottom:n.bottom}),i.click(function(){s.animate({scrollTop:0},n.speed)}),e.scroll(function(){var o=e.scrollTop();n.autohide&&(o>n.offset?i.fadeIn(n.speed):i.fadeOut(n.speed))})}}(jQuery); 8 | -------------------------------------------------------------------------------- /docs/assets/js/sw.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * docsify sw.js 3 | * =========================================================== 4 | * Copyright 2016 @huxpro 5 | * Licensed under Apache 2.0 6 | * Register service worker. 7 | * ========================================================== */ 8 | 9 | const RUNTIME = 'docsify' 10 | const HOSTNAME_WHITELIST = [ 11 | self.location.hostname, 12 | 'fonts.gstatic.com', 13 | 'fonts.googleapis.com', 14 | 'cdn.jsdelivr.net' 15 | ] 16 | 17 | // The Util Function to hack URLs of intercepted requests 18 | const getFixedUrl = (req) => { 19 | var now = Date.now() 20 | var url = new URL(req.url) 21 | 22 | // 1. fixed http URL 23 | // Just keep syncing with location.protocol 24 | // fetch(httpURL) belongs to active mixed content. 25 | // And fetch(httpRequest) is not supported yet. 26 | url.protocol = self.location.protocol 27 | 28 | // 2. add query for caching-busting. 29 | // Github Pages served with Cache-Control: max-age=600 30 | // max-age on mutable content is error-prone, with SW life of bugs can even extend. 31 | // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. 32 | // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 33 | if (url.hostname === self.location.hostname) { 34 | url.search += (url.search ? '&' : '?') + 'cache-bust=' + now 35 | } 36 | return url.href 37 | } 38 | 39 | /** 40 | * @Lifecycle Activate 41 | * New one activated when old isnt being used. 42 | * 43 | * waitUntil(): activating ====> activated 44 | */ 45 | self.addEventListener('activate', event => { 46 | event.waitUntil(self.clients.claim()) 47 | }) 48 | 49 | /** 50 | * @Functional Fetch 51 | * All network requests are being intercepted here. 52 | * 53 | * void respondWith(Promise r) 54 | */ 55 | self.addEventListener('fetch', event => { 56 | // Skip some of cross-origin requests, like those for Google Analytics. 57 | if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { 58 | // Stale-while-revalidate 59 | // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale 60 | // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 61 | const cached = caches.match(event.request) 62 | const fixedUrl = getFixedUrl(event.request) 63 | const fetched = fetch(fixedUrl, { cache: 'no-store' }) 64 | const fetchedCopy = fetched.then(resp => resp.clone()) 65 | 66 | // Call respondWith() with whatever we get first. 67 | // If the fetch fails (e.g disconnected), wait for the cache. 68 | // If there’s nothing in cache, wait for the fetch. 69 | // If neither yields a response, return offline pages. 70 | event.respondWith( 71 | Promise.race([fetched.catch(_ => cached), cached]) 72 | .then(resp => resp || fetched) 73 | .catch(_ => { /* eat any errors */ }) 74 | ) 75 | 76 | // Update the cache with the version we fetched (only for ok status) 77 | event.waitUntil( 78 | Promise.all([fetchedCopy, caches.open(RUNTIME)]) 79 | .then(([response, cache]) => response.ok && cache.put(event.request, response)) 80 | .catch(_ => { /* eat any errors */ }) 81 | ) 82 | } 83 | }) -------------------------------------------------------------------------------- /frontend/dist/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/frontend/dist/index.html -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "private": true, 4 | "version": "0.0.0", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "vite": "^3.0.7" 12 | } 13 | } -------------------------------------------------------------------------------- /frontend/wailsjs/go/main/APP.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function InitConfig():Promise>; 5 | 6 | export function SynchronizeServer(arg1:boolean):Promise; 7 | 8 | export function SynchronizeSettings(arg1:Record):Promise; 9 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/main/APP.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function InitConfig() { 6 | return window['go']['main']['APP']['InitConfig'](); 7 | } 8 | 9 | export function SynchronizeServer(arg1) { 10 | return window['go']['main']['APP']['SynchronizeServer'](arg1); 11 | } 12 | 13 | export function SynchronizeSettings(arg1) { 14 | return window['go']['main']['APP']['SynchronizeSettings'](arg1); 15 | } 16 | -------------------------------------------------------------------------------- /frontend/wailsjs/runtime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wailsapp/runtime", 3 | "version": "2.0.0", 4 | "description": "Wails Javascript runtime library", 5 | "main": "runtime.js", 6 | "types": "runtime.d.ts", 7 | "scripts": { 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/wailsapp/wails.git" 12 | }, 13 | "keywords": [ 14 | "Wails", 15 | "Javascript", 16 | "Go" 17 | ], 18 | "author": "Lea Anthony ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/wailsapp/wails/issues" 22 | }, 23 | "homepage": "https://github.com/wailsapp/wails#readme" 24 | } 25 | -------------------------------------------------------------------------------- /gui.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | 4 | import ( 5 | "embed" 6 | "github.com/wailsapp/wails/v2" 7 | "github.com/wailsapp/wails/v2/pkg/options" 8 | "github.com/wailsapp/wails/v2/pkg/options/assetserver" 9 | ) 10 | 11 | 12 | //go:embed all:frontend/dist 13 | var assets embed.FS 14 | 15 | 16 | func main() { 17 | app := NewApp() 18 | 19 | RegisterRouter() 20 | 21 | err := wails.Run(&options.App{ 22 | Title: "Go Transfer", 23 | Width: 800, 24 | Height: 550, 25 | MinWidth: 800, 26 | MinHeight: 550, 27 | MaxWidth: 950, 28 | MaxHeight: 650, 29 | AssetServer: &assetserver.Options{ 30 | Assets: assets, 31 | }, 32 | BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, 33 | OnStartup: app.startup, 34 | Bind: []interface{}{ 35 | app, 36 | }, 37 | }) 38 | 39 | if err != nil { 40 | println("Error:", err.Error()) 41 | } 42 | } -------------------------------------------------------------------------------- /images/GUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/images/GUI.png -------------------------------------------------------------------------------- /images/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/images/app.png -------------------------------------------------------------------------------- /images/cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/images/cli.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Illusionna/LocalTransfer/0930759bb9166831c5bf5564730499e6c9ed9a12/images/screenshot.png -------------------------------------------------------------------------------- /types.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "embed" 5 | "net/http" 6 | ) 7 | 8 | //go:embed UI/* 9 | var ui embed.FS 10 | 11 | var SERVER *http.Server 12 | var IS_RUNNING bool = false 13 | 14 | var HOST_IPv4 string = GetLocalIPv4Addresses() 15 | var HOST_PORT string = "8888" 16 | var SHARE_DIR string = "." 17 | var UPLOAD_DIR string = "." 18 | var MAX_SIZE string = "1.2 GB" 19 | var LOGIN_PASSWORD string = "" 20 | 21 | var ANNOUNCEMENT_STATUS bool = true // 公告栏状态, 若为 false, 则禁用前后端该功能, 以此类推. 22 | var UPLOAD_STATUS bool = true // 上传状态. 23 | var SEARCH_STATUS bool = true // 搜索状态. 24 | var DELETE_STATUS bool = true // 删除状态. 25 | var MKDIR_STATUS bool = true // 创建文件夹状态. 26 | var COPY_STATUS bool = true // 复制粘贴状态. 27 | var MOVE_STATUS bool = true // 移动放置状态. 28 | var RENAME_STATUS bool = true // 重命名状态. 29 | 30 | var USER_LOCK map[string]bool = map[string]bool{"localhost+curl": false, "127.0.0.1+curl": false} 31 | 32 | var CURRENT_HANDLER http.Handler = http.NotFoundHandler() 33 | 34 | var CONTENTEDITABLE string = "" // 公告栏富文本内容. 35 | 36 | type DynamicHandler struct{} 37 | 38 | type SERVER_PARAMS struct{ 39 | ANNOUNCEMENT_STATUS_ bool // 公告栏状态, 若为 false, 则禁用前后端该功能, 以此类推. 40 | UPLOAD_STATUS_ bool // 上传状态. 41 | SEARCH_STATUS_ bool // 搜索状态. 42 | DELETE_STATUS_ bool // 删除状态. 43 | MKDIR_STATUS_ bool // 创建文件夹状态. 44 | COPY_STATUS_ bool // 复制粘贴状态. 45 | MOVE_STATUS_ bool // 移动放置状态. 46 | RENAME_STATUS_ bool // 重命名状态. 47 | } 48 | 49 | type FILE_INFO struct { 50 | FileName string `json:"FileName"` // 文件名称. 51 | FileSize string `json:"FileSize"` // 文件尺寸. 52 | FileIcon string `json:"FileIcon"` // 文件图标. 53 | ModifiedTime string `json:"ModifiedTime"` // 文件最后修改时间 54 | } 55 | 56 | 57 | type FILE_REQUEST struct { 58 | Path string `json:"Path"` // 请求文件的相对路径. 59 | CurrentDir string `json:"CurrentDir"` // 请求文件所在的当前目录. 60 | } 61 | 62 | 63 | type FILE_PROPERTY struct { 64 | FileCount int64 `json:"FileCount"` // 文件累计个数. 65 | SumSize string `json:"SumSize"` // 文件累计大小. 66 | ModifiedTime string `json:"ModifiedTime"` // 最后修改时间. 67 | AgoTime string `json:"AgoTime"` // 多久前. 68 | } 69 | 70 | type CONTENTEDITABLE_REQUEST struct { 71 | Content string `json:"Content"` // 公告栏内容. 72 | } 73 | 74 | 75 | type FILE_SEARCH struct { 76 | Path []string `json:"Path"` 77 | Target string `json:"Target"` 78 | CurrentDir string `json:"CurrentDir"` 79 | } 80 | 81 | 82 | type FILE_RENAME struct { 83 | CurrentDir string `json:"CurrentDir"` 84 | OldName string `json:"OldName"` 85 | NewName string `json:"NewName"` 86 | Prefix string `json:"Prefix"` 87 | Suffix string `json:"Suffix"` 88 | } -------------------------------------------------------------------------------- /wails.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://wails.io/schemas/config.v2.json", 3 | "name": "GoTransfer", 4 | "outputfilename": "GoTransfer", 5 | "frontend:install": "npm install", 6 | "frontend:build": "npm run build", 7 | "frontend:dev:watcher": "npm run dev", 8 | "frontend:dev:serverUrl": "auto", 9 | "author": { 10 | "name": "Illusionna", 11 | "email": "www@orzzz.net" 12 | } 13 | } 14 | --------------------------------------------------------------------------------