Commit graph

11 commits

Author SHA1 Message Date
eb06ffbfd8
feat: add STUN/TURN server support and environment config
- Extended .gitignore to exclude .env files containing sensitive info.
- Imported `crypto` module and added route to generate TURN credentials.
- Enhanced upload/download functionality to use STUN/TURN servers.
- Improved UI text for upload/download scenarios for clarity.
- Added fetching of TURN credentials in the client to enable P2P connections.

These changes improve file sharing reliability by providing fallbacks for network traversal.
2024-06-14 18:32:51 +02:00
1a1ddbeeb6
chore(gitattributes): limit linguist-vendored to webtorrent
Adjusted .gitattributes to specify only `webtorrent.min.js` as linguist-vendored instead of the whole `public/dist` directory. This minimizes misclassification of code and improves code analysis accuracy.
2024-06-14 17:59:36 +02:00
0e58f8f78f
Revert "feat: add minified WebTorrent script"
This reverts commit ac0cce0894.
2024-06-14 17:58:08 +02:00
a8019c01a4
feat(ui): separate CSS and JS into external files
Moved inline CSS from index.ejs to a new style.css file for cleaner structure and maintainability. Extracted embedded JavaScript to index.js to streamline HTML and enhance script manageability.

Benefits:
- Improved readability and organization of HTML
- Easier maintenance and updates for CSS and JS
- Potential for CSS and JS caching, improving load times

No functional changes were made. Refactors existing code for better practices.
2024-06-14 17:53:35 +02:00
c398a409b6
chore: mark dist files as linguist-vendored
Added .gitattributes to classify public/dist files as vendored.
This helps Forgejo's linguist tool ignore these files for language stats,
providing a clearer view of the project’s actual codebase.
2024-06-14 17:46:35 +02:00
ac0cce0894
feat: add minified WebTorrent script
Add a new minified WebTorrent script to improve page load times.
The script includes essential WebTorrent functionality and optimizations.
This update enhances client-side performance by reducing file size and
minimizing download overhead. No breaking changes introduced.
2024-06-14 17:43:31 +02:00
e4a4a5d1d8
feat(ui): update file transfer terminology
Changed 'Upload File' to 'Share File' to better reflect the functionality and improve user guidance. Added explanatory note informing users that the file will remain available as long as the page is open.
2024-06-14 17:34:36 +02:00
269f19401e
style(tracker): standardize string quotations
Switched from single to double quotes throughout tracker.js
for consistent string formatting. This improves code
readability and maintains uniformity across the project.
2024-06-14 17:15:11 +02:00
f2ece65e12
fix(logging): correct string template for server URL
Replaced incorrect curly braces in the console log statement with proper template literals to accurately display the HOST and PORT values. This ensures the tracker URL is displayed correctly in the console, improving debugging and monitoring.
2024-06-14 17:14:29 +02:00
36c4ee56f3
feat: add WebTorrent support with minified script
Integrated WebTorrent for enhanced torrent capabilities by including a minified version of its library. This provides functionality for handling torrent files, streaming media, and managing peer connections.

The integration supports features such as piece fetching, bitfield management, and peer communication, crucial for efficient torrent handling and P2P media streaming.
2024-06-14 16:59:22 +02:00
a53fabdec1
feat: add initial WebTorrent-based file transfer app
- Initialize new Express application for file transfer using WebTorrent.
- Set up routes for generating and retrieving mnemonics and info hashes.
- Implement custom BitTorrent tracker server with WebSockets.
- Add `.gitignore` to exclude `node_modules/`.
- Create `index.ejs` for front-end with file upload and download functionalities.
- Initialize `package.json` and `package-lock.json` with necessary dependencies.
2024-06-14 16:57:55 +02:00