feat: 更新README和Hero组件,添加GitHub链接,优化WebRTC连接配置

This commit is contained in:
MatrixSeven
2025-08-05 14:26:48 +08:00
parent ef02e88ee9
commit 6cc66435f6
3 changed files with 36 additions and 10 deletions

View File

@@ -1,9 +1,13 @@
# 文件快传 - P2P文件传输工具
### 在线体验 https://transfer.52python.cn
![项目演示](img.png)
> 安全、快速、简单的点对点文件传输解决方案 - 无需注册,即传即用
## ✨ 核心功能
- 📁 **文件传输** - 支持多文件同时传输基于WebRTC的P2P直连
@@ -11,7 +15,7 @@
- 🖥️ **桌面共享** - 实时屏幕共享(开发中)
- 🔒 **端到端加密** - 数据传输安全,服务器不存储文件
- 📱 **响应式设计** - 完美适配手机、平板、电脑
- 🖥️ **多平台支持** - 支持linux/macos/win 单文件部署
## 🚀 技术栈
**前端** - Next.js 15 + React 18 + TypeScript + Tailwind CSS
@@ -23,7 +27,8 @@
```bash
git clone https://github.com/MatrixSeven/file-transfer-go.git
cd file-transfer-go
docker-compose up -d
./build-fullstack.sh
./dist/file-transfer-go
```
访问 http://localhost:8080 开始使用

View File

@@ -1,6 +1,7 @@
"use client";
import React from 'react';
import { Github } from 'lucide-react';
export default function Hero() {
return (
@@ -11,11 +12,33 @@ export default function Hero() {
<p className="text-sm sm:text-base text-slate-600 max-w-xl mx-auto leading-relaxed px-4 mb-3">
<br />
<span className="text-xs sm:text-sm text-slate-500"> - </span>
<span className="text-xs sm:text-sm text-slate-500">WebRTC的端到端服务 - </span>
</p>
{/* GitHub开源链接 */}
<div className="flex items-center justify-center gap-2 mb-4">
<a
href="https://github.com/MatrixSeven/file-transfer-go"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 px-3 py-1.5 text-xs sm:text-sm text-slate-600 hover:text-slate-800 bg-slate-100 hover:bg-slate-200 rounded-full transition-colors duration-200 border border-slate-200 hover:border-slate-300"
>
<Github className="w-3 h-3 sm:w-4 sm:h-4" />
<span className="font-medium"></span>
</a>
<span className="text-xs text-slate-400">|</span>
<a
href="https://github.com/MatrixSeven/file-transfer-go"
target="_blank"
rel="noopener noreferrer"
className="text-xs text-slate-500 hover:text-slate-700 hover:underline transition-colors duration-200"
>
https://github.com/MatrixSeven/file-transfer-go
</a>
</div>
{/* 分割线 */}
<div className="w-64 sm:w-80 md:w-96 lg:w-[32rem] xl:w-[40rem] h-0.5 bg-gradient-to-r from-blue-400 via-purple-400 to-indigo-400 mx-auto mt-4 mb-2 opacity-60"></div>
<div className="w-64 sm:w-80 md:w-96 lg:w-[32rem] xl:w-[40rem] h-0.5 bg-gradient-to-r from-blue-400 via-purple-400 to-indigo-400 mx-auto mt-2 mb-2 opacity-60"></div>
</div>
);
}

View File

@@ -55,12 +55,10 @@ export function useWebRTCConnection() {
const STUN_SERVERS = [
// Edge 浏览器专用优化配置
{ urls: 'stun:stun.miwifi.com' },
{ urls: 'stun:stun.chat.bilibili.com' },
{ urls: 'stun:turn.cloudflare.com:3478' },
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun1.l.google.com:19302' },
{ urls: 'stun:stun2.l.google.com:19302' },
{ urls: 'stun:stun3.l.google.com:19302' },
{ urls: 'stun:stun4.l.google.com:19302' },
// 备用 STUN 服务器
{ urls: 'stun:stun.nextcloud.com:443' },
{ urls: 'stun:stun.sipgate.net:10000' },
@@ -69,7 +67,7 @@ export function useWebRTCConnection() {
// 获取浏览器特定的 RTCConfiguration
const getBrowserSpecificConfig = useCallback(() => {
const { isEdge, isSafari, isChromeFamily } = detectBrowser();
const { isSafari, isChromeFamily } = detectBrowser();
const baseConfig = {
iceServers: STUN_SERVERS,