首页
导航
文章导航
壁纸
留言板
更多
直播
友链
统计
关于
Search
1
常用安装脚本知识 [24年10月27日更新]
3 阅读
2
经典老电影10部
3 阅读
3
春天来了清新图片
3 阅读
4
水:生命之源
3 阅读
5
Gmail隐藏技能:一个账号如何变出99个邮箱身分,垃圾注册永远不再困扰你
3 阅读
默认
日常
学习
技术
登录
Search
标签搜索
cloudflare
白嫖
CF
docker
安装
脚本
壁纸
图片
Linux
Caddy
代码
哪吒
节点
域名
邮箱
github
搭建
桌面壁纸
手机壁纸
NAT
ws01
累计撰写
129
篇文章
累计收到
45
条评论
首页
栏目
默认
日常
学习
技术
页面
导航
文章导航
壁纸
留言板
直播
友链
统计
关于
搜索到
102
篇与
的结果
2026-02-10
CF上部署视频播放
CF上部署视频播放特别提醒:1、部署时替换6个链接地址为你的链接地址2、默认登录密码为:admin3、CF上修改登录密码命名:ADMIN_PASSWORD4、链接地址中的文件为:txt格式,txt格式中的MP4播放书写MP4文件直链地址|MP4文件名代码export default { async fetch(request, env, ctx) { // 设置CORS头 const corsHeaders = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type', }; // 处理预检请求 if (request.method === 'OPTIONS') { return new Response(null, { headers: corsHeaders }); } const url = new URL(request.url); // 登录逻辑 if (url.pathname === '/login' && request.method === 'POST') { const formData = await request.formData(); const password = formData.get('password'); const adminPassword = env.ADMIN_PASSWORD || 'admin123'; // 从环境变量读取密码,默认为admin123 if (password === adminPassword) { // 登录成功,设置 Cookie return new Response('', { status: 302, headers: { 'Set-Cookie': `auth=1; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=3600`, 'Location': '/' } }); } else { return new Response(this.renderLoginPage('密码错误,请重试!'), { headers: { 'Content-Type': 'text/html;charset=utf-8', ...corsHeaders } }); } } // 退出逻辑 if (url.pathname === '/logout') { return new Response('', { status: 302, headers: { 'Set-Cookie': `auth=; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=0`, 'Location': '/' } }); } // 检查是否已登录 const cookie = request.headers.get('Cookie') || ''; if (!cookie.includes('auth=1')) { return new Response(this.renderLoginPage(), { headers: { 'Content-Type': 'text/html;charset=utf-8', ...corsHeaders } }); } // 读取七个视频列表文件 let links = []; let links1 = [], links2 = [], links3 = [], links4 = [], links5 = [], links6 = [], links7 = []; let randomLink = ''; const parseList = (text) => text.split('\n').filter(line => line.trim() !== ''); const results = await Promise.allSettled([ fetch('链接地址1').then(r => r.text()).then(parseList), fetch('链接地址2').then(r => r.text()).then(parseList), fetch('链接地址3').then(r => r.text()).then(parseList), fetch('链接地址4').then(r => r.text()).then(parseList), fetch('链接地址5').then(r => r.text()).then(parseList), fetch('链接地址6').then(r => r.text()).then(parseList), fetch('链接地址7t').then(r => r.text()).then(parseList) ]); links1 = results[0].status === 'fulfilled' ? results[0].value : []; links2 = results[1].status === 'fulfilled' ? results[1].value : []; links3 = results[2].status === 'fulfilled' ? results[2].value : []; links4 = results[3].status === 'fulfilled' ? results[3].value : []; links5 = results[4].status === 'fulfilled' ? results[4].value : []; links6 = results[5].status === 'fulfilled' ? results[5].value : []; links7 = results[6].status === 'fulfilled' ? results[6].value : []; links = [...links1, ...links2, ...links3, ...links4, ...links5, ...links6, ...links7]; if (links.length === 0) { links1 = links2 = links3 = links4 = links5 = links6 = links7 = links = ['https://sample-videos.com/zip/10/mp4/SampleVideo_1280x720_1mb.mp4|测试视频']; } randomLink = links[0].split('|')[0]; // 生成 HTML 内容 const htmlContent = ` <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>自动随机播放 MP4 视频</title> <link rel="shortcut icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>💠</text></svg>"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"> <style> body { margin: 0; padding: 0; height: 100vh; display: flex; justify-content: center; align-items: center; background-color: #f0f0f0; font-family: Arial, sans-serif; flex-direction: column; } /* 按钮样式 */ #playPauseBtn, #prevBtn, #nextBtn, #togglePlaylistBtn, #randomBtn, #singleLoopBtn { background-color: black; color: white; border: none; padding: 10px 20px; margin: 5px; cursor: pointer; border-radius: 5px; transition: background-color 0.3s ease; } /* 按钮悬停效果 */ #playPauseBtn:hover, #prevBtn:hover, #nextBtn:hover, #togglePlaylistBtn:hover, #randomBtn:hover, #singleLoopBtn:hover { background-color: #333; } /* 播放模式按钮激活状态 */ #randomBtn.active, #singleLoopBtn.active { background-color: #0F52BA; } #randomBtn.active:hover, #singleLoopBtn.active:hover { background-color: #00318C; } .sites { width: 640px; background: #F2F2F2; border: 1px solid rgba(0,0,0,.01); margin: 6px auto; padding: 10px; height: 320px; display: flex; flex-direction: column; box-sizing: border-box; } .list-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; flex-shrink: 0; } .list-tab { background-color: #ddd; color: #333; border: 1px solid #ccc; padding: 8px 14px; cursor: pointer; border-radius: 6px; font-size: 14px; transition: all 0.2s ease; } .list-tab:hover { background-color: #ccc; } .list-tab.active { background-color: #0F52BA; color: #fff; border-color: #0F52BA; } .list-panel { display: none; flex: 1; min-height: 0; overflow: hidden; flex-direction: column; } .list-panel.active { display: flex; } /* 居中对齐容器 */ .video-container { display: flex; justify-content: center; align-items: center; margin: -0cm 0 0 0; } /* 标题下移 */ h2 { text-align: center; margin-bottom: 1cm; } /* 播放列表:限制高度,超出部分可上下滚动选择,132px显示5个视频列表,156px显示6个视频列表 */ .playlist { list-style-type: none; padding: 0; margin: 0; flex: 1; min-height: 0; max-height: 156px; overflow-y: auto; overflow-x: hidden; text-align: left; border: 1px solid #ccc; background-color: #fff; border-radius: 4px; } .playlist li { margin: 5px 0; cursor: pointer; color: #000000; font-size: 15px; text-decoration: underline; transition: color 0.3s ease; } .playlist li:hover { color: green; } /* 定义正在播放的样式 */ .playlist li.playing { color: red !important; font-weight: bold; } </style> </head> <body> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1cm;"> <h2 style="margin: 0;">自动随机播放 MP4 视频</h2> <a href="/logout" style="color: #666; text-decoration: none; padding: 8px 12px; border-radius: 6px; transition: all 0.2s; background-color: rgba(0,0,0,0.1);" onmouseover="this.style.backgroundColor='rgba(0,0,0,0.2)'; this.style.color='#333'" onmouseout="this.style.backgroundColor='rgba(0,0,0,0.1)'; this.style.color='#666'" title="退出登录"> <i class="fas fa-sign-out-alt"></i> 退出 </a> </div> <div class="video-container"> <video id="videoPlayer" width="640" height="360" controls> <source src="${randomLink}" type="video/mp4"> 您的浏览器不支持视频播放。 </video> </div> <!-- 新增按钮区域 --> <div style="text-align: center; margin: 4px 0;"> <button id="togglePlaylistBtn">播放列表</button> <button id="playPauseBtn">▶</button> <button id="prevBtn">❚◀</button> <button id="nextBtn">▶❚</button> <button id="randomBtn" title="随机播放">🔀</button> <button id="singleLoopBtn" title="单曲循环">🔁</button> </div> <div class="sites" id="playlistContainer" style="display: none;"> <div class="list-tabs"> <button type="button" class="list-tab" data-list-id="1">列表1</button> <button type="button" class="list-tab" data-list-id="2">列表2</button> <button type="button" class="list-tab" data-list-id="3">列表3</button> <button type="button" class="list-tab" data-list-id="4">列表4</button> <button type="button" class="list-tab" data-list-id="5">列表5</button> <button type="button" class="list-tab" data-list-id="6">列表6</button> <button type="button" class="list-tab" data-list-id="7">列表7</button> <button type="button" class="list-tab active" data-list-id="all">综合列表</button> </div> <div class="list-panel active" id="panel-all"> <ul class="playlist" id="playlist-all" data-list-id="all"> ${links.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="all" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-1"> <ul class="playlist" id="playlist-1" data-list-id="1"> ${links1.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="1" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-2"> <ul class="playlist" id="playlist-2" data-list-id="2"> ${links2.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="2" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-3"> <ul class="playlist" id="playlist-3" data-list-id="3"> ${links3.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="3" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-4"> <ul class="playlist" id="playlist-4" data-list-id="4"> ${links4.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="4" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-5"> <ul class="playlist" id="playlist-5" data-list-id="5"> ${links5.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="5" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-6"> <ul class="playlist" id="playlist-6" data-list-id="6"> ${links6.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="6" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> <div class="list-panel" id="panel-7"> <ul class="playlist" id="playlist-7" data-list-id="7"> ${links7.map((link, index) => { const [url, title] = link.split('|'); return `<li data-src="${url}" data-list-id="7" data-index="${index}">${index + 1}. ${title}</li>`; }).join('')} </ul> </div> </div> <script> const videoLinks = ${JSON.stringify(links)}; const videoLinks1 = ${JSON.stringify(links1)}; const videoLinks2 = ${JSON.stringify(links2)}; const videoLinks3 = ${JSON.stringify(links3)}; const videoLinks4 = ${JSON.stringify(links4)}; const videoLinks5 = ${JSON.stringify(links5)}; const videoLinks6 = ${JSON.stringify(links6)}; const videoLinks7 = ${JSON.stringify(links7)}; const listIdToLinks = { 'all': videoLinks, '1': videoLinks1, '2': videoLinks2, '3': videoLinks3, '4': videoLinks4, '5': videoLinks5, '6': videoLinks6, '7': videoLinks7 }; const videoPlayer = document.getElementById('videoPlayer'); const playPauseBtn = document.getElementById('playPauseBtn'); const prevBtn = document.getElementById('prevBtn'); const nextBtn = document.getElementById('nextBtn'); let currentPlaylistId = 'all'; let currentVideoIndex = 0; let playMode = 'order'; let playedIndexes = []; function getCurrentLinks() { return listIdToLinks[currentPlaylistId] || videoLinks; } document.addEventListener('DOMContentLoaded', () => { playVideo(currentVideoIndex); updatePlaylistStyle(currentPlaylistId, currentVideoIndex); updateModeButtons(); }); function updateModeButtons() { document.getElementById('randomBtn').classList.toggle('active', playMode === 'random'); document.getElementById('singleLoopBtn').classList.toggle('active', playMode === 'single'); } function updatePlaylistStyle(listId, index) { document.querySelectorAll('.playlist li').forEach(li => { li.classList.remove('playing'); if (li.getAttribute('data-list-id') === listId && parseInt(li.getAttribute('data-index'), 10) === index) { li.classList.add('playing'); } }); } function playVideo(index) { const list = getCurrentLinks(); if (!list.length) return; index = (index + list.length) % list.length; currentVideoIndex = index; const [url] = list[index].split('|'); videoPlayer.src = url; videoPlayer.play(); updatePlaylistStyle(currentPlaylistId, currentVideoIndex); } playPauseBtn.addEventListener('click', () => { if (videoPlayer.paused) { videoPlayer.play(); playPauseBtn.textContent = '⏸'; } else { videoPlayer.pause(); playPauseBtn.textContent = '▶'; } }); prevBtn.addEventListener('click', () => { const list = getCurrentLinks(); currentVideoIndex = (currentVideoIndex - 1 + list.length) % list.length; playVideo(currentVideoIndex); }); nextBtn.addEventListener('click', () => { const list = getCurrentLinks(); currentVideoIndex = (currentVideoIndex + 1) % list.length; playVideo(currentVideoIndex); }); videoPlayer.addEventListener('ended', () => { if (playMode === 'single') { videoPlayer.currentTime = 0; videoPlayer.play(); return; } const list = getCurrentLinks(); if (playMode === 'random') { const unplayed = list.map((_, i) => i).filter(i => !playedIndexes.includes(i)); if (unplayed.length === 0) { playedIndexes = []; currentVideoIndex = Math.floor(Math.random() * list.length); } else { currentVideoIndex = unplayed[Math.floor(Math.random() * unplayed.length)]; } playedIndexes.push(currentVideoIndex); } else { currentVideoIndex = (currentVideoIndex + 1) % list.length; } playVideo(currentVideoIndex); }); document.getElementById('randomBtn').addEventListener('click', () => { playMode = playMode === 'random' ? 'order' : 'random'; playedIndexes = []; updateModeButtons(); }); document.getElementById('singleLoopBtn').addEventListener('click', () => { playMode = playMode === 'single' ? 'order' : 'single'; updateModeButtons(); }); const togglePlaylistBtn = document.getElementById('togglePlaylistBtn'); const playlistContainer = document.getElementById('playlistContainer'); togglePlaylistBtn.addEventListener('click', () => { if (playlistContainer.style.display === 'none') { playlistContainer.style.display = 'block'; togglePlaylistBtn.textContent = '隐藏列表'; } else { playlistContainer.style.display = 'none'; togglePlaylistBtn.textContent = '播放列表'; } }); document.querySelectorAll('.list-tab').forEach(tab => { tab.addEventListener('click', () => { const listId = tab.getAttribute('data-list-id'); document.querySelectorAll('.list-tab').forEach(t => t.classList.remove('active')); document.querySelectorAll('.list-panel').forEach(p => p.classList.remove('active')); tab.classList.add('active'); const panel = document.getElementById('panel-' + listId); if (panel) panel.classList.add('active'); }); }); playlistContainer.addEventListener('click', function(event) { if (event.target.tagName === 'LI') { const listId = event.target.getAttribute('data-list-id'); const index = parseInt(event.target.getAttribute('data-index'), 10); const selectedUrl = event.target.getAttribute('data-src'); currentPlaylistId = listId; currentVideoIndex = index; playedIndexes = []; videoPlayer.src = selectedUrl; videoPlayer.play(); updatePlaylistStyle(currentPlaylistId, currentVideoIndex); } }); </script> </body> </html> `; return new Response(htmlContent, { headers: { 'Content-Type': 'text/html', ...corsHeaders, }, }) }, // 登录页面渲染函数 renderLoginPage(msg = '') { return `<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>视频播放器 - 登录</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"> <link rel="shortcut icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>💠</text></svg>"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Noto Sans SC', 'Segoe UI', Arial, sans-serif; background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); background-size: 400% 400%; animation: gradient-animation 15s ease infinite; height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; } @keyframes gradient-animation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .login-container { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border-radius: 20px; padding: 40px 30px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); width: 100%; max-width: 400px; text-align: center; animation: fadeInUp 0.6s ease-out; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } .logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; color: #333; } .logo i { font-size: 32px; color: #0F52BA; } .logo span { font-size: 24px; font-weight: bold; } .login-title { font-size: 22px; color: #333; margin-bottom: 10px; font-weight: 600; } .login-subtitle { color: #666; margin-bottom: 30px; font-size: 14px; } .error-message { background: rgba(211, 47, 47, 0.1); color: #d32f2f; padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; border: 1px solid rgba(211, 47, 47, 0.2); } .form-group { margin-bottom: 20px; text-align: left; } .form-group label { display: block; color: #333; margin-bottom: 8px; font-weight: 500; font-size: 14px; } .password-wrapper { position: relative; width: 100%; } .password-wrapper input { width: 100%; padding: 15px 50px 15px 15px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 16px; outline: none; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.9); } .password-wrapper input:focus { border-color: #0F52BA; box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.1); background: #fff; } .password-wrapper input::placeholder { color: #999; } .toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #666; cursor: pointer; font-size: 18px; transition: color 0.3s ease; padding: 5px; } .toggle-password:hover { color: #0F52BA; } .login-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, #0F52BA, #00318C); border: none; border-radius: 12px; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; margin-top: 10px; } .login-btn:hover { background: linear-gradient(135deg, #00318C, #001F5C); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(15, 82, 186, 0.3); } .login-btn:active { transform: translateY(0); } .login-footer { margin-top: 20px; color: #666; font-size: 12px; } .login-footer a { color: #0F52BA; text-decoration: none; } .login-footer a:hover { text-decoration: underline; } /* 响应式设计 */ @media (max-width: 480px) { .login-container { margin: 20px; padding: 30px 20px; } } </style> </head> <body> <div class="login-container"> <div class="logo"> <i class="fas fa-video"></i> <span>视频播放器</span> </div> <h1 class="login-title">🔒 请输入密码</h1> <p class="login-subtitle">访问视频播放器需要身份验证</p> ${msg ? `<div class="error-message">${msg}</div>` : ''} <form method="POST" action="/login"> <div class="form-group"> <label for="password">管理员密码</label> <div class="password-wrapper"> <input type="password" id="password" name="password" placeholder="输入登录密码" required> <button type="button" class="toggle-password" onclick="togglePassword()"> <i class="fas fa-eye"></i> </button> </div> </div> <button type="submit" class="login-btn"> <i class="fas fa-sign-in-alt"></i> 登录 </button> </form> <div class="login-footer"> <p>© 2025 视频播放器</p> </div> </div> <script> function togglePassword() { const input = document.getElementById('password'); const icon = document.querySelector('.toggle-password i'); if (input.type === 'password') { input.type = 'text'; icon.className = 'fas fa-eye-slash'; } else { input.type = 'password'; icon.className = 'fas fa-eye'; } } // 回车键登录 document.getElementById('password').addEventListener('keypress', function(e) { if (e.key === 'Enter') { document.querySelector('form').submit(); } }); // 自动聚焦到密码输入框 window.addEventListener('load', function() { document.getElementById('password').focus(); }); </script> </body> </html>`; }, };
2026年02月10日
2 阅读
0 评论
0 点赞
2025-12-27
修改outlook邮箱密码、恢复码、备用邮箱教程
修改outlook邮箱密码、恢复码、备用邮箱教程 转自 经常有佬友买机器,被别有用心的卖家收回邮箱和搬瓦工机器的消息。大概率对方使用outlook邮箱,outlook有一个验证方式非常的隐蔽,可以绕过所有其他验证方式收回outlook!针对这个情况,我们需要将这个验证方式更改为新的。一、登录outlook安全中心:https://account.microsoft.com/security ,接着使用Outlook 邮箱账户登录,登录后如图所示(需要修改两个地方): 二、第一个需要修改的地方–>登录outlook安全中心——安全——管理登录方式 三、第二个需要修改的地方–>登录outlook安全中心——账户——安全——其他安全选项 点进去以后,这里可以看到所有的安全选项,你把能修改的,全部都修改了(或者添加新的验证方式),其中还有非常隐蔽的一个选项生成新的恢复代码流程! 生成新的恢复代码流程:拉到最下面,点击 [生成新代码],并保存,这一步非常重要!这里非常的隐蔽,邮箱被原主人回收,也是拜次恢复代码所致它可以绕过上面设置的所有密保方式,直接收回outlook! 原邮箱主人收回此邮箱的概率基本为0!
2025年12月27日
2 阅读
0 评论
0 点赞
2025-11-15
注册Office E3 Symphony可以订阅【200万】或 E3 Developer【25个】授权许可
用到的几个页面重置密码:https://admin.microsoft.com/管理页面:https://admin.microsoft.com/AdminPortal/Homeonedrive网盘页面:https://portal.office.com/onedriveE3 Developer重复购买:https://admin.cloud.microsoft/?pid=C69E7747-2566-4897-8CBA-B998ED3BAB88&quan=25&bc=1&sku=189a915c-fe4f-4ffa-bde4-85b9628d07a0&ru=PDP#/Purchase/checkout{dotted startColor="#ff6c6c" endColor="#1989fa"/}方法一、推荐1、打开注册页面,注册时选择中国,https://azure.microsoft.com/en-us/帐号注册成功后,搜索用户,点击进入后可能出现登录问题2、进入下面页面https://azure.microsoft.com/en-us/pricing/purchase-options/azure-account?cid=azurefreeaccount选择免费试用,选择个人帐号,中国,电话随便,到填写信用卡时直接关闭3、查看分配的管理员帐号:https://portal.azure.com/#home,再次搜索用户后,查看并记录好分配的帐号,进入下一步重置密码4、重置密码:https://admin.microsoft.com/密码重置后,登录,购买,设置5、修改月付为年付,onedrive网盘配置,1T为5T,分配帐号权限,添加新帐号和密码,等6、打开上面的E3 Developer重复购买,可重复购买,不过多了也用不完。{dotted startColor="#ff6c6c" endColor="#1989fa"/}方法二、奶油说的带Symphony的,比Developer版本还要爽,授权高达200万个许可。看到一大清早很多人卡在Azure用户报错,其实也不需要Azure,这个方法更爽!直接创建一个空全局管理员注册链接:https://signup.microsoft.com/get-started/signup?products=35dffc92-9eb4-4d5c-82c2-2582b37bb9c4&culture=zh-cn&country=cn上面的注册链接是国区。如果要换区请改完参数再访问,如country=us是注册美区。主要是国区会出现Alipay(支付宝)选项不需要绑定,别忘了从头到尾国家或地区一定要选中国!然后登录方法就可以自定义 xxx@xxx.onmicrosoft.com 了。前缀建议还是admin除非你记得住,后缀写你自己喜欢的就行。然后纳税人识别号就是身份证号码,用自己亲戚的就行。然后跟奶油一样,到信用卡那步(出现Visa/MasterCard图标)直接关掉页面。绑什么卡,老子没有信用卡!开订阅,可反复叠加。Developer和Symphony二选一!我知道你很急,刚刚不是创建好了吗?OK了家人们,直接用下面这3个链接,除了Dev是25个上限其他俩都是200万。也就是25+200w+200w,我觉得你用也用不完,直接爽撸!25个许可数量的 E3 Developerhttps://admin.cloud.microsoft/?pid=C69E7747-2566-4897-8CBA-B998ED3BAB88&quan=25&bc=1&sku=189a915c-fe4f-4ffa-bde4-85b9628d07a0&ru=PDP#/Purchase/checkout2000000个许可数量的 Office 365 Enterprise E3 for Symphonyhttps://admin.cloud.microsoft/?pid=C18B235E-8366-48B8-AE41-6E596C44944D&quan=2000000&bc=1&sku=6fd2c87f-b296-42f0-b197-1e91e994b900&ru=PDP#/Purchase/checkout2000000个许可数量的 Office 365 Enterprise E1 for Symphonyhttps://admin.cloud.microsoft/?pid=A89F6463-1F7B-4F51-90DD-8C182637B002&quan=2000000&bc=1&sku=18181a46-0d4e-45cd-891e-60aabd171b4e&ru=PDP#/Purchase/checkout最后这个E1 Symphony还是有点用的,可以给他升级成E3,那就是200w+200w总共400w许可了!然后扩容啥的自己去SharePoint管理的设置,找到OneDrive的上限,把1024改成5120就5个T了,注意是每人5TB,25个人加起来125TB以此类推!剩下的续订啥的,去账单那边看订阅,能改年付改年付,反正别再花心思折腾什么Azure了。
2025年11月15日
3 阅读
0 评论
0 点赞
2025-11-01
在cloudflare上部署IP6.ARPA域名自动添加SSL证书
在cloudflare上部署IP6.ARPA域名自动添加SSL证书export default { async fetch(request, env, ctx) { const url = new URL(request.url); // 处理 API 请求:支持 POST (/api/add-ssl) 和 GET (/?...) if ( (url.pathname === '/api/add-ssl' && request.method === 'POST') || (url.pathname === '/' && request.method === 'GET' && url.searchParams.has('zoneId')) ) { return handleApiRequest(request, url.searchParams); } // 返回 HTML 页面 (仅当是根路径的 GET 请求且没有API参数时) return new Response(getHTML(), { headers: { 'Content-Type': 'text/html; charset=utf-8', }, }); }, }; // 统一处理 API 请求(支持 POST Body 和 GET Query Params) async function handleApiRequest(request, queryParams) { let email, zone_id, api_key, enabled, certificate_authority; try { if (request.method === 'POST') { // POST 请求:从请求体中解析 JSON const body = await request.json(); email = body.email; zone_id = body.zoneId; api_key = body.apikey; enabled = body.enabled !== undefined ? body.enabled : true; certificate_authority = body.ca || "ssl_com"; } else if (request.method === 'GET') { // GET 请求:从 URL 查询参数中获取 email = queryParams.get('email'); zone_id = queryParams.get('zoneId'); api_key = queryParams.get('apikey'); enabled = !(queryParams.get('enabled') === 'false'); certificate_authority = queryParams.get('ca') || "ssl_com"; } // 验证必需的输入 if (!email || !zone_id || !api_key) { return new Response(JSON.stringify({ success: false, errors: ['邮箱、区域ID和API密钥都是必需的'] }), { status: 400, headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', } }); } // 验证并设置 CA 默认值 const validCAs = ["ssl_com", "lets_encrypt", "google", "sectigo"]; const caToUse = validCAs.includes(certificate_authority) ? certificate_authority : "ssl_com"; // 调用 Cloudflare API const response = await fetch(`https://api.cloudflare.com/client/v4/zones/${zone_id}/ssl/universal/settings`, { method: 'PATCH', headers: { 'X-Auth-Email': email, 'X-Auth-Key': api_key, 'Content-Type': 'application/json', }, body: JSON.stringify({ enabled: enabled, certificate_authority: caToUse }), }); const result = await response.json(); // 为 API 调用返回 JSON 响应 return new Response(JSON.stringify(result), { headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, POST', 'Access-Control-Allow-Headers': 'Content-Type', }, }); } catch (error) { return new Response(JSON.stringify({ success: false, errors: [{ message: `请求失败: ${error.message || '未知错误'}` }] }), { status: 500, headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', } }); } } // getHTML 函数保持不变,因为前端表单仍然使用 POST 请求 function getHTML() { return `<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>IP6.ARPA域名自动添加SSL证书</title> <meta name="description" content="一键为您的 IP6.ARPA 反向解析域名自动申请和配置 Cloudflare 通用 SSL 证书,同时提供 IP6.ARPA 域名生成工具。"> <link rel="icon" href="https://tunnelbroker.net/favicon.ico" type="image/ico"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" /> <style> * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d); color: #333; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 10px; } .container { background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.15); width: 100%; max-width: 840px; padding: 30px; margin: 30px; } h1 { text-align: center; margin-bottom: 25px; color: #e58d1dd9; font-size: 36px; position: relative; padding-bottom: 15px; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); } /* CSS for two-column layout */ .form-row { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; } .form-group.half-width { flex: 1; margin-bottom: 0; } .ca-select-style { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 16px; transition: all 0.3s; } .ca-select-style:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); outline: none; } .registration-buttons { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 25px; } .register-btn { flex: 1; display: block; background: #1163c2; color: white; text-align: center; text-decoration: none; border-radius: 8px; padding: 10px 15px; font-size: 16px; font-weight: 600; transition: all 0.3s; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15); } .register-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 8px; font-weight: 600; color: #2c3e50; } input[type="text"], input[type="email"], textarea, .ca-select-style { width: 100%; padding: 12px 15px; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 8px; font-size: 16px; color: #2c3e50; transition: all 0.3s; resize: none; } .ca-select-style { height: 48px; } input[type="text"]:focus, input[type="email"]:focus, textarea:focus, .ca-select-style:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); outline: none; background: rgba(255, 255, 255, 0.5); } .error { border-color: #e74c3c !important; box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important; } .error-message { color: #e74c3c; font-size: 14px; margin-top: 5px; display: none; } .btn { background: linear-gradient(to right, #1a2a6c, #b21f1f); color: white; border: none; border-radius: 8px; padding: 14px 20px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; transition: all 0.3s; display: flex; justify-content: center; align-items: center; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15); } .info-box .btn#generate-btn { margin-top: 15px; } .info-box .btn#generate-btn i { position: relative; top: 1px; } .btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } .btn:active { transform: translateY(0); } .spinner { display: none; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: white; animation: spin 1s ease-in-out infinite; margin-right: 10px; } @keyframes spin { to { transform: rotate(360deg); } } .result { margin-top: 20px; padding: 15px; border-radius: 8px; display: none; text-align: center; font-weight: 600; } .success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; } .error-result { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } .info-box { background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-left: 4px solid #db6034; padding: 15px; margin-top: 25px; border-radius: 8px; } .info-box h2 { color: #2c3e50; margin-bottom: 10px; font-size: 20px; } .info-box p { font-size: 14px; line-height: 1.5; color: #34495e; } .footer { text-align: center; margin-top: 20px; font-size: 14px; color: #444; } .footer a { color: inherit; text-decoration: none; transition: color 0.3s; } .footer a:hover { color: #3498db; } .separator { padding: 0 5px; color: inherit; display: inline-block; } /* 响应式调整:在小屏幕上变回单列布局 */ @media (max-width: 600px) { .form-row { flex-direction: column; gap: 0; } .form-group.half-width { margin-bottom: 20px; } .footer { font-size: 0.8em; } } </style> </head> <body> <div class="container"> <h1>IP6.ARPA域名自动添加SSL证书</h1> <div class="registration-buttons"> <a href="https://tb.netassist.ua" class="register-btn" target="_blank"><i class="fas fa-registered"></i> ip6.arpa 注册地址1(已崩)</a> <a href="https://dns.he.net" class="register-btn" target="_blank"><i class="fas fa-registered"></i> ip6.arpa 注册地址2</a> <a href="https://tunnelbroker.net/" class="register-btn" target="_blank"><i class="fas fa-registered"></i> ip6.arpa 注册地址3</a> </div> <form id="ssl-form"> <div class="form-row"> <div class="form-group half-width"> <label for="email"><i class="fas fa-envelope"></i> Cloudflare注册邮箱 (Email)</label> <input type="email" id="email" placeholder="请输入您的Cloudflare邮箱"> <div class="error-message" id="email-error">请输入有效的邮箱地址</div> </div> <div class="form-group half-width"> <label for="zone-id"><i class="fas fa-id-card"></i> 区域ID (Zone ID)</label> <input type="text" id="zone-id" placeholder="请输入您的区域ID"> <div class="error-message" id="zone-id-error">请输入区域ID</div> </div> </div> <div class="form-row"> <div class="form-group half-width"> <label for="api-key"><i class="fas fa-key"></i> 全局API密钥 (API Key)</label> <input type="text" id="api-key" placeholder="请输入您的API密钥"> <div class="error-message" id="api-key-error">请输入API密钥</div> </div> <div class="form-group half-width"> <label for="ca-select"><i class="fas fa-landmark"></i> CA证书颁发机构</label> <select id="ca-select" class="ca-select-style"> <option value="ssl_com">SSL.com (默认)</option> <option value="lets_encrypt">Let's Encrypt</option> <option value="google">Google Trust Services</option> <option value="sectigo">Sectigo</option> </select> </div> </div> <button type="submit" class="btn" id="submit-btn"> <div class="spinner" id="spinner"></div> <span id="btn-text"><i class="fas fa-plus-circle"></i> 添加 SSL 证书</span> </button> </form> <div class="result" id="result-message"></div> <div class="info-box"> <h2>IP6.ARPA 域名生成工具</h2> <div class="form-row" style="margin-top: 15px;"> <div class="form-group half-width"> <label for="ipv6-cidr"><i class="fas fa-network-wired"></i> 输入 IPv6 CIDR 地址</label> <input type="text" id="ipv6-cidr" placeholder="请输入 IPv6 CIDR, 例如: 2001:DB8::/48"> <div class="error-message" id="ipv6-cidr-error">请输入有效的 IPv6 CIDR</div> <button type="button" class="btn" id="generate-btn"><i class="fas fa-sync-alt"></i> 生成 IP6.ARPA 域名</button> </div> <div class="form-group half-width"> <label for="generated-domain"><i class="fas fa-check-circle"></i> IP6.ARPA 域名生成结果</label> <textarea id="generated-domain" readonly rows="4" placeholder="生成结果将显示在这里"></textarea> </div> </div> </div> <div class="info-box"> <h2>API GET 调用示例</h2> <p style="font-size: 14px; margin-bottom: 10px;">证书颁发机构 (ca) 支持:<code>ssl_com</code>、<code>lets_encrypt</code>、<code>google</code>、<code>sectigo</code>。<strong>注意:ip6.arpa 域名通常仅支持 <code>ssl_com</code>。</strong></p> <pre style="background: rgba(255, 255, 255, 0.7); padding: 10px; border-radius: 6px; font-size: 14px; overflow-x: auto; color: #000;">https://worker地址/?zoneId=...&email=...&apikey=...&enabled=true&ca=ssl_com</pre> </div> <div class="footer"> <i class="fas fa-copyright"></i> Copyright 2025 <span class="separator">|</span> <a href="https://gist.github.com/eooce/d3549e80a67dd39e47a55f81bae6b802" target="_blank"><i class="fab fa-github"></i> GitHub源代码</a> <span class="separator">|</span> <a href="https://t.me/eooceu" target="_blank"><i class="fas fa-telegram"></i> telegram群组</a> <p style="margin-top: 10px;">此站点中api key仅用于请求,不记录,如有疑问,可自行在cloudflare workers部署</p> </div> </div> <script> // ========================================================== // 域名生成逻辑 (支持随机子域名生成) // ========================================================== // 辅助函数:将缩写的 IPv6 地址展开为完整的 32 位十六进制字符串 function expandIpv6(ipv6) { ipv6 = ipv6.toLowerCase(); // 检查是否有 '::' 缩写 if (!ipv6.includes('::')) { return ipv6.split(':').map((block) => block.padStart(4, '0')).join(''); } const parts = ipv6.split('::'); const leftBlocks = parts[0].split(':').filter(Boolean); const rightBlocks = parts[1].split(':').filter(Boolean); const existingBlocksCount = leftBlocks.length + rightBlocks.length; const zeroBlocksCount = 8 - existingBlocksCount; if (zeroBlocksCount < 0) { throw new Error('IPv6 地址块过多,格式错误。'); } const zeroPadding = Array(zeroBlocksCount).fill('0000').join(''); // 填充左侧和右侧的块,然后合并 const fullLeft = leftBlocks.map((block) => block.padStart(4, '0')).join(''); const fullRight = rightBlocks.map((block) => block.padStart(4, '0')).join(''); return fullLeft + zeroPadding + fullRight; } // 辅助函数:生成指定长度的随机十六进制字符串 function randomHex(length) { let result = ''; const characters = '0123456789abcdef'; for (let i = 0; i < length; i++) { result += characters.charAt(Math.floor(Math.random() * characters.length)); } return result; } // 生成 ipv6 反向根域名 function generateArpaRootDomain(cidr) { const parts = cidr.split('/'); if (parts.length !== 2) { throw new Error('CIDR 格式不正确,请使用 IP/前缀长度 格式。'); } const ipv6 = parts[0].trim(); const prefixLength = parseInt(parts[1], 10); if (isNaN(prefixLength) || prefixLength < 0 || prefixLength > 128 || prefixLength % 4 !== 0) { throw new Error('前缀长度无效,必须是 4 的倍数 (例如: /32, /48, /64)。'); } const fullHex = expandIpv6(ipv6); // 获取完整的 32 字符十六进制地址 const hexCharsInPrefix = prefixLength / 4; // 截取固定的网络前缀部分 const networkPrefix = fullHex.substring(0, hexCharsInPrefix); const reversed = networkPrefix.split('').reverse().join('.'); // 反转并用 '.' 分隔 return reversed + '.ip6.arpa'; // 拼接后缀 } // 生成随机前缀域名 function generateRandomPrefixDomains(baseArpaDomain) { const domains = [baseArpaDomain]; // 根域名 for (let i = 0; i < 3; i++) { // 生成 1 到 4 位长的随机十六进制字符串 const randomLength = Math.floor(Math.random() * 4) + 1; // 1 to 4 const prefix = randomHex(randomLength).split('').join('.'); domains.push(prefix + '.' + baseArpaDomain); } return domains; } // ========================================================== // DOM 交互逻辑 // ========================================================== // 辅助函数:从本地存储加载 CIDR function loadSavedCidr() { const savedCidr = localStorage.getItem('ipv6Cidr'); if (savedCidr) { document.getElementById('ipv6-cidr').value = savedCidr; } } // 辅助函数:保存 CIDR 到本地存储 function saveCidr(cidr) { localStorage.setItem('ipv6Cidr', cidr); } // 辅助函数:显示字段错误 function showError(fieldId, message) { const field = document.getElementById(fieldId); const errorElement = document.getElementById(fieldId + '-error'); field.classList.add('error'); errorElement.textContent = message; errorElement.style.display = 'block'; if (!document.querySelector('.error:focus')) { field.focus(); } } // 辅助函数:重置所有错误状态 function resetErrors() { const errorFields = document.querySelectorAll('.error'); const errorMessages = document.querySelectorAll('.error-message'); errorFields.forEach((field) => { field.classList.remove('error'); }); errorMessages.forEach((message) => { message.style.display = 'none'; }); } // 辅助函数:显示操作结果 function showResult(message, type) { const resultElement = document.getElementById('result-message'); resultElement.textContent = message; resultElement.className = 'result'; resultElement.classList.add(type === 'success' ? 'success' : 'error-result'); resultElement.style.display = 'block'; resultElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } // 辅助函数:执行复制操作 (仅使用 Clipboard API) async function copyTextToClipboard(text) { if (navigator.clipboard && navigator.clipboard.writeText) { try { await navigator.clipboard.writeText(text); return true; } catch (err) { console.warn('Clipboard API 复制失败或权限被拒绝:', err); return false; } } else { console.warn('浏览器不支持 navigator.clipboard API。'); return false; } } // ========================================================== // 页面初始化和事件监听 // ========================================================== document.addEventListener('DOMContentLoaded', function () { // 1. 加载保存的 CIDR loadSavedCidr(); // 2. 监听 CIDR 输入,实时保存 document.getElementById('ipv6-cidr').addEventListener('input', function (e) { saveCidr(e.target.value.trim()); }); // 3. 事件监听: IPv6 域名生成 (调用随机生成函数) document.getElementById('generate-btn').addEventListener('click', async function () { resetErrors(); const cidrInput = document.getElementById('ipv6-cidr'); const domainOutput = document.getElementById('generated-domain'); const cidr = cidrInput.value.trim(); domainOutput.value = ''; if (!cidr) { showError('ipv6-cidr', '请输入 IPv6 CIDR 地址。'); return; } try { const rootDomain = generateArpaRootDomain(cidr); // 生成 ARPA 根域名 const generatedDomains = generateRandomPrefixDomains(rootDomain); // 生成包含根域名和随机前缀的 4 个域名列表 const resultText = generatedDomains.join('\\n'); // 将所有域名格式化成多行文本 domainOutput.value = resultText; // 将所有 4 个域名赋值给 textarea const copySuccess = await copyTextToClipboard(resultText); // 复制操作 (复制所有 4 个域名) let resultMessage = 'IP6.ARPA 域名生成成功!共生成 4 个域名。'; if (copySuccess) { resultMessage += '所有域名已自动复制到剪贴板。'; } else { resultMessage += '自动复制失败,请手动复制文本框中的内容。'; } showResult(resultMessage, 'success'); console.log("生成的 4 个域名:\\n" + resultText); } catch (error) { showError('ipv6-cidr', error.message || '生成域名失败, 请检查CIDR格式。'); showResult('生成失败: ' + (error.message || '未知错误'), 'error'); } }); // 4. 事件监听: Cloudflare SSL 提交 document.getElementById('ssl-form').addEventListener('submit', async function (e) { e.preventDefault(); // 获取输入值 const email = document.getElementById('email').value.trim(); const zoneId = document.getElementById('zone-id').value.trim(); const apikey = document.getElementById('api-key').value.trim(); const caSelect = document.getElementById('ca-select').value; // 重置错误状态 resetErrors(); // 验证输入 let isValid = true; if (!email) { showError('email', '请输入有效的邮箱地址'); isValid = false; } if (!zoneId) { showError('zone-id', '请输入区域ID'); isValid = false; } if (!apikey) { showError('api-key', '请输入API密钥'); isValid = false; } if (!isValid) return; // 显示加载状态 document.getElementById('spinner').style.display = 'block'; document.getElementById('btn-text').textContent = '添加中...'; document.getElementById('submit-btn').disabled = true; try { // 发送请求到 Worker API const response = await fetch('/api/add-ssl', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ email: email, zoneId: zoneId, apikey: apikey, enabled: true, ca: caSelect, }), }); const data = await response.json(); // 显示结果 if (data.success) { showResult('证书添加成功, 请10分钟后在Cloudflare该域名里检查SSL/TLS证书', 'success'); } else { let errorMsg = '添加证书失败'; if (data.errors && data.errors.length > 0) { errorMsg += ': ' + (data.errors[0].message || JSON.stringify(data.errors[0])); } else if (data.errors) { errorMsg += ': ' + JSON.stringify(data.errors); } showResult(errorMsg, 'error'); } } catch (error) { showResult('请求失败,请检查网络连接', 'error'); console.error('Error:', error); } finally { // 隐藏加载状态 document.getElementById('spinner').style.display = 'none'; document.getElementById('btn-text').textContent = '添加SSL证书'; document.getElementById('submit-btn').disabled = false; } }); }); </script> </body> </html>`; }
2025年11月01日
2 阅读
0 评论
0 点赞
2025-11-01
在cloudflare搭建隧道
在cloudflare搭建隧道1、登录 cloudflare ,进入左边的 Zero Trust ,再进入左边的网络 Tunnels ,注意进入的次序。2、创建隧道,选择 cloudflared ,命名隧道名称后保存隧道,记录好命令【就是创建好的隧道代码】3、配置隧道,进入下一步,选择子域名和域名。服务选择 HTTP ,URL选择例子中的链接地址localhost:8001,完成设置。
2025年11月01日
1 阅读
0 评论
0 点赞
1
2
...
21