Commit Graph

58 Commits

Author SHA1 Message Date
david_bai 8ef43029d5 fix(deploy+docker+frontend): enforce same-origin via Nginx, disable Next Image optimization in Docker, allow Socket.IO polling fallback, and improve health checks and access info
- generate-config.sh: add --with-nginx flag handling; when enabled, set NEXT_PUBLIC_API_URL empty to use same-origin /api and /socket.io; add BACKEND_INTERNAL_URL for SSR/internal fetch; adjust lan-tls HTTPS (8443) and TLS generation policy
- deploy.sh: show only valid access URLs when Nginx is enabled (gateway URLs), avoid misleading :3002/:3001 entries
- frontend (env/webrtc): return mutable transports [websocket,polling]; use empty signaling server for same-origin; comments in English
- frontend (next.config): support NEXT_IMAGE_UNOPTIMIZED to turn off image optimization in Docker
- frontend (health): prefer BACKEND_INTERNAL_URL for internal health checks, fallback to public URL/localhost
- docker-compose + Dockerfile(frontend): pass NEXT_IMAGE_UNOPTIMIZED and BACKEND_INTERNAL_URL envs
2025-10-10 20:49:17 +08:00
david_bai cfcd60145a build: refresh docker deployment workflow 2025-09-26 14:02:55 +08:00
david_bai 3f075c4a97 fix:Fix a Type error 2025-09-14 23:47:42 +08:00
david_bai 55f118be9a chore:Temporarily comment out some debug logs 2025-09-14 23:30:47 +08:00
david_bai 95331cb8e6 chore:Remove the redundant safety save button; Use English comments 2025-09-14 23:25:16 +08:00
david_bai d0ba2eb9c4 chore:Folder resuming transfer is normal 2025-09-14 19:44:11 +08:00
david_bai 79089bed7e chore:Saving folders to disk now works correctly 2025-09-14 16:49:06 +08:00
david_bai 4dcdf0c3a0 chore:The breakpoint resuming file is saved normally 2025-09-14 11:44:35 +08:00
david_bai 327de90f52 chore:Fix the issue where the breakpoint resume receiver is missing one chunk of data 2025-09-14 11:29:51 +08:00
david_bai b5404cea72 chore:Split the fileReceiver.ts 2025-09-14 08:36:20 +08:00
david_bai 33f2f041ac fix:Try to fix the problem of incomplete file size in resumable download 2025-09-14 07:35:34 +08:00
david_bai 8627544946 chore:Exit the room even if it is in transit 2025-09-13 20:01:02 +08:00
david_bai 526e1b49c1 fix:Fix the issue of downloads failing in certain browsers 2025-09-08 23:59:29 +08:00
david_bai 0747898f3c chore:Use English notes 2025-09-08 00:38:59 +08:00
david_bai 8ff2302c14 code clear up 2025-09-08 00:12:02 +08:00
david_bai 5ca911d1e1 Using a simple backpressure mechanism 2025-09-07 23:38:15 +08:00
david_bai 230a06b3fb fileSender code splitting 2025-09-07 22:52:59 +08:00
david_bai 99c927f5c7 clear up code 2025-09-07 21:21:43 +08:00
david_bai 3f18002cf0 Directly writing to disk was also tested and passed 2025-09-06 23:49:10 +08:00
david_bai e385389e1d Fix the out-of-order file transfer issue for files saved in memory 2025-09-06 22:53:54 +08:00
david_bai 81c2b204f3 It is found that the order of data packets received by Firefox is disordered 2025-09-05 22:58:56 +08:00
david_bai ec6a18dfc0 fix:Adapting to Firefox browser, not yet completed 2025-09-05 00:19:33 +08:00
david_bai 5af2e8db37 chore:Use English comments instead of Chinese 2025-08-31 23:34:52 +08:00
david_bai 1aa738425f chore:remove debug code 2025-08-31 22:22:00 +08:00
david_bai 0562e8a3a8 chore(code):Use the speedCalculator to estimate network quality 2025-08-31 22:09:23 +08:00
david_bai c0317211e7 chore(code):add optimized code, need further debugging 2025-08-31 20:10:31 +08:00
david_bai 7f33064109 chore(code):retryDataSend Add return value,fileSender Remove unnecessary variables. 2025-08-30 23:49:09 +08:00
david_bai ad4a951525 chore:remove debug code 2025-08-30 00:37:32 +08:00
david_bai 4437c70257 fix:Temporarily optimized the speed issue on the mobile 2025-08-30 00:06:59 +08:00
david_bai b38ef84bca chore:fileSender code has been simplified and adjusted 2025-08-29 23:39:35 +08:00
david_bai 9b6e6559fe fix:Temporarily optimized the speed issue on the mobile 2025-08-29 22:51:10 +08:00
david_bai a1a70bbff5 fix:Fix the bug in server-side rendering where navigator is not available 2025-08-24 08:15:01 +08:00
david_bai a0554fb185 fix:Fix the download status synchronization issue.
Fix the issue where download cannot find file (status synchronization problem).
Change postLogInDebug to postLogToBackend for better understanding.
2025-08-18 23:26:56 +08:00
david_bai bb21c90a4e fix:Fix the incomplete cleanup issue when the receiver exits the room 2025-08-17 23:56:09 +08:00
david_bai caa861f1bb refactor:Optimize chaotic state management 2025-08-17 15:44:59 +08:00
david_bai 307232bd15 fix:Attempt to fix the issue of asynchronous exit room status in the receiver 2025-08-14 23:02:33 +08:00
david_bai 7038e79726 fix:Change the behavior of reloading the webpage when the receiver exits the room to a more elegant approach 2025-08-13 22:53:49 +08:00
david_bai 12cda8c030 fea:Add an elegant exit room feature for the recipient 2025-08-10 23:16:59 +08:00
david_bai 245c4efcd0 fix(blog url bug): fix blog url bug
Fixed the bug of redundant language suffix in blog URLs, added lang to the blog homepage link to prevent language switching issues.
2025-08-02 23:27:02 +08:00
david_bai 34d1897093 Fix the issue where the sender and receiver (without requesting existing files) have inconsistent states in resumeable file transfer with broken connections 2025-07-21 23:06:32 +08:00
david_bai 27cb5c3be8 Fix transfer status in resume state 2025-07-21 00:02:51 +08:00
david_bai 9ce63992b7 Fix the problem of resuming downloads when the webpage is closed or the network is disconnected. Further testing is needed. 2025-07-19 00:24:44 +08:00
david_bai 522f567fb4 feat(transfer): implement resumable file uploads
This commit introduces support for resumable file transfers when using the 'Save to Directory' feature.

Key changes:
- The WebRTC protocol is updated to include an 'offset' in the 'fileRequest' message.
- 'FileReceiver' now checks for partially downloaded files in the selected directory. If a partial file is found, it requests to resume the transfer from the offset of the existing file size. It uses '{ keepExistingData: true }' to append to the file.
- 'FileSender' now handles requests with an 'offset' and uses 'file.slice(offset)' to send only the remaining data.
- Progress calculation is adjusted to reflect the resumed download state.

This provides a more robust user experience for large file transfers, allowing recovery from interruptions like network loss or accidental tab closure.
2025-07-16 22:50:55 +08:00
david_bai 8ea2016218 fix(receiver): Prevent duplicate downloads on directory save
When saving files to a user-selected directory, the browser would trigger an additional, redundant download.

This was caused by a race condition where the UI checked the file's save method (saveType) before the flag was updated upon completion. The decision to save to disk was made too late in the process.

This commit resolves the issue by setting the saveType at the beginning of the file request. This ensures the UI has the correct information when the transfer finishes, preventing the extra download.
2025-07-15 23:13:59 +08:00
david_bai 6e90a78a4b Responsive drag and drop of files using FullScreenDropZone Component 2025-07-02 23:53:22 +08:00
david_bai f09452ac2a reformat all ts code via prettier 2025-06-22 21:34:54 +08:00
david_bai e62a8f9573 translate frontend/hooks & frontend/lib 2025-06-22 10:05:00 +08:00
david_bai 445ab2ef04 优化,初步ok 2025-06-10 23:25:59 +08:00
david_bai cabb943103 微调,待测试 2025-06-09 23:10:16 +08:00
david_bai 341a392c20 重构了,待测试 2025-06-09 21:32:43 +08:00