thì là đúng bài này đó...em muốn dùng warp for team và chặn quảng cáo thì có cách nào không ạ
Zero Trust ko tính traffic fen, xài vô tưMí hoàng tử ới.
Chạy trên app zero trust, hok lẽ nó ko tính quota traffic đi qua hả mấy hoàng tử. Unlimited all á ?
Hay là bị vịn lại theo key
vô tư đi thím, zero trust free chỉ giới hạn 300k rule và 50 users/1 nhóm thôiMí hoàng tử ới.
Chạy trên app zero trust, hok lẽ nó ko tính quota traffic đi qua hả mấy hoàng tử. Unlimited all á ?
Hay là bị vịn lại theo key
Zero Trust ko tính traffic fen, xài vô tư
vô tư đi thím, zero trust free chỉ giới hạn 300k rule và 50 users/1 nhóm thôi
Điểm bất lợi nữa là toàn server ở nước ngoài nên mùa đứt cáp chắc hơi hẹo :v
Ý bạn như thế nào nhỉKo ý mình là xài kiểu wireguard của zerotrust á.
Mấy thím log bằng app zero trust thử đi, nó như vpn á. Ý em là cái này, ko lẽ free hết
lửa chùa hết mà fenKo ý mình là xài kiểu wireguard của zerotrust á.
Mấy thím log bằng app zero trust thử đi, nó như vpn á. Ý em là cái này, ko lẽ free hết
Thì nó là vpn free mà. Có mục nạp vip, mà hình như chưa thấy ai ri viu có gì đặc sắc hơn bản free ko
thím cho em more detail được không ạ.thì là đúng bài này đó...
warp for team giờ đổi tên thành zero trust rồi fen.
Thì phải xem #2thím cho em more detail được không ạ.
Em làm theo hướng dẫn #1, rồi tạo Zero Trust rồi đăng nhập trên điện thoại là có thể vừa vpn vừa adblock được phải không ?
Làm sao để hiện dns ipv4 vậy bác? Tài khoản của em có mỗi ipv6.Hướng dẫn sử dụng Cloudflare Worker để cập nhật IP match với Cloudflare qua DDNS:
Tại sao nên dùng: Bạn có thể set dns dạng 172.64.36.1, 172.64.36.2 thẳng vào router và sử dụng cho tất cả các thiết bị mạng có trong nhà mà không cần phải dùng DoH, DoT. Tốc độ truy vấn rất nhanh
(1) Tạo Worker và chỉnh sửa code theo code dưới đây:
- Yêu cầu có ddns trỏ về IP nhà.
- Cloudflare API, Cloudflare Email, API Key, Cloudflare ID (có hướng dẫn lấy tại #1)
Tiếp theo
Tiếp theo
Tiếp theo, nhập Name cho Worker
Kéo xuống cuối trang nhấn Deploy
Tiếp theo, nhấn Edit code
Tiếp theo, xoá tất cả các code, sửa code theo dưới đây:
Điền các thông tin sau:
- Chỉnh sửa các thông tin: accountEmail, accountId (Cloudflare ID), apiKey, domain (DDNS của bạn).
=> Save and deploy.Code:addEventListener('scheduled', (event) => { event.waitUntil(handleRequest()); }); addEventListener('fetch', (event) => { return event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { const accountEmail = ''; const accountId= ''; const apiToken = ''; const domain = ''; const ip = await resolveDomain(domain); if (ip) { console.log(`The IP address of ${domain} is: ${ip}`); const locationId = await getLocationId(accountId, apiToken, accountEmail); if (locationId) { console.log(`The location ID is: ${locationId}`); const updateResult = await updateLocation(accountId, apiToken, locationId, ip, accountEmail); if (updateResult) { console.log("Update location successful:"); console.log(`Location ID: ${updateResult.id}`); console.log(`Name: ${updateResult.name}`); console.log(`IP: ${updateResult.networks[0].network}`); console.log(`Subnet: ${updateResult.networks[0].network.split('/')[1]}`); console.log(`Created At: ${updateResult.created_at}`); console.log(`Updated At: ${updateResult.updated_at}`); } else { console.log("No location data found."); } } else { console.log("No locations found."); } } else { console.log(`Failed to resolve the IP address of ${domain}`); } return new Response('Worker execution completed', { status: 200 }); } async function resolveDomain(domain) { const apiURL = 'https://dns.google.com/resolve'; const queryURL = new URL(apiURL); queryURL.searchParams.append('name', domain); queryURL.searchParams.append('type', 'A'); const response = await fetch(queryURL); const data = await response.json(); if (data.Answer instanceof Array && data.Answer.length > 0) { const ipAddresses = data.Answer .filter(answer => answer.type === 1) .map(answer => answer.data); return ipAddresses[0] || null; } else { return null; } } async function getLocationId(accountId, apiToken, accountEmail) { const url = `https://api.cloudflare.com/client/v4/accounts/${accountId}/gateway/locations`; const response = await fetch(url, { headers: { 'Authorization': `Bearer ${apiToken}`, 'Content-Type': 'application/json', 'X-Auth-Email': accountEmail, 'X-Auth-Key': apiToken } }); if (response.ok) { const data = await response.json(); const result = data.result; return result.length > 0 ? result[0].id : null; } else { return null; } } async function updateLocation(accountId, apiToken, locationId, ip, accountEmail) { const url = `https://api.cloudflare.com/client/v4/accounts/${accountId}/gateway/locations/${locationId}`; const response = await fetch(url, { method: 'PUT', headers: { 'Authorization': `Bearer ${apiToken}`, 'Content-Type': 'application/json', 'X-Auth-Email': accountEmail, 'X-Auth-Key': apiToken }, body: JSON.stringify({ client_default: true, ecs_support: true, name: 'RouterZTE', networks: [ { network: `${ip}/32` } ] }) }); if (response.ok) { const data = await response.json(); return data.result || null; } else { return null; } }
(2) Tạo Cron trigger để tự động chạy script cập nhật IP qua DDNS mỗi 1 phút (rất nhanh).
(3) Chỉnh sửa giá trị Minutes là 1 (Chạy worker mỗi phút), sau đó nhấn Add Trigger
(4) Kết quả như thế này là hoàn tất:
4. Cập nhật DNS cho thiết bị của bạn:
IPV4:
172.64.36.1
172.64.36.2
---
Máy tính:
Các thiết bị khác tương tự
Tốt nhất là đặt lên Router tổng để áp dụng cho tất cả các thiết bị trong nhà.
5. Kết thúc
Chúc các bạn cấu hình thành công. Sử dụng DNS dạng này cảm giác lướt web rất nhanh, không bị lỗi DoH (Mikrotik DoH không ổn định).
Kiểm tra xem đã chặn quảng cáo chưa:
Link 1: Test Ad Block - Toolz (https://d3ward.github.io/toolz/adblock.html)
Link 2: AdBlock Test (https://iblockads.net/test)
Nhớ flush dns trước khi test nhé.
CMD: ipconfig /flushdns
*đã cập nhật ảnh lỗi
Có đề cập trong hướng dẫn luôn, ipv4 giống nhau hếtLàm sao để hiện dns ipv4 vậy bác? Tài khoản của em có mỗi ipv6.
Cập nhật DNS cho thiết bị của bạn:
IPV4:
172.64.36.1
172.64.36.2
Thế là dùng chung à bácCó đề cập trong hướng dẫn luôn, ipv4 giống nhau hết
Hướng dẫn sử dụng Cloudflare Worker để cập nhật IP match với Cloudflare qua DDNS:
Tại sao nên dùng: Bạn có thể set dns dạng 172.64.36.1, 172.64.36.2 thẳng vào router và sử dụng cho tất cả các thiết bị mạng có trong nhà mà không cần phải dùng DoH, DoT. Tốc độ truy vấn rất nhanh
(1) Tạo Worker và chỉnh sửa code theo code dưới đây:
- Yêu cầu có ddns trỏ về IP nhà.
- Cloudflare API, Cloudflare Email, API Key, Cloudflare ID (có hướng dẫn lấy tại #1)
Tiếp theo
Tiếp theo
Tiếp theo, nhập Name cho Worker
Kéo xuống cuối trang nhấn Deploy
Tiếp theo, nhấn Edit code
Tiếp theo, xoá tất cả các code, sửa code theo dưới đây:
Điền các thông tin sau:
- Chỉnh sửa các thông tin: accountEmail, accountId (Cloudflare ID), apiKey, domain (DDNS của bạn).
=> Save and deploy.Code:addEventListener('scheduled', (event) => { event.waitUntil(handleRequest()); }); addEventListener('fetch', (event) => { return event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { const accountEmail = ''; const accountId= ''; const apiToken = ''; const domain = ''; const ip = await resolveDomain(domain); if (ip) { console.log(`The IP address of ${domain} is: ${ip}`); const locationId = await getLocationId(accountId, apiToken, accountEmail); if (locationId) { console.log(`The location ID is: ${locationId}`); const updateResult = await updateLocation(accountId, apiToken, locationId, ip, accountEmail); if (updateResult) { console.log("Update location successful:"); console.log(`Location ID: ${updateResult.id}`); console.log(`Name: ${updateResult.name}`); console.log(`IP: ${updateResult.networks[0].network}`); console.log(`Subnet: ${updateResult.networks[0].network.split('/')[1]}`); console.log(`Created At: ${updateResult.created_at}`); console.log(`Updated At: ${updateResult.updated_at}`); } else { console.log("No location data found."); } } else { console.log("No locations found."); } } else { console.log(`Failed to resolve the IP address of ${domain}`); } return new Response('Worker execution completed', { status: 200 }); } async function resolveDomain(domain) { const apiURL = 'https://dns.google.com/resolve'; const queryURL = new URL(apiURL); queryURL.searchParams.append('name', domain); queryURL.searchParams.append('type', 'A'); const response = await fetch(queryURL); const data = await response.json(); if (data.Answer instanceof Array && data.Answer.length > 0) { const ipAddresses = data.Answer .filter(answer => answer.type === 1) .map(answer => answer.data); return ipAddresses[0] || null; } else { return null; } } async function getLocationId(accountId, apiToken, accountEmail) { const url = `https://api.cloudflare.com/client/v4/accounts/${accountId}/gateway/locations`; const response = await fetch(url, { headers: { 'Authorization': `Bearer ${apiToken}`, 'Content-Type': 'application/json', 'X-Auth-Email': accountEmail, 'X-Auth-Key': apiToken } }); if (response.ok) { const data = await response.json(); const result = data.result; return result.length > 0 ? result[0].id : null; } else { return null; } } async function updateLocation(accountId, apiToken, locationId, ip, accountEmail) { const url = `https://api.cloudflare.com/client/v4/accounts/${accountId}/gateway/locations/${locationId}`; const response = await fetch(url, { method: 'PUT', headers: { 'Authorization': `Bearer ${apiToken}`, 'Content-Type': 'application/json', 'X-Auth-Email': accountEmail, 'X-Auth-Key': apiToken }, body: JSON.stringify({ client_default: true, ecs_support: true, name: 'RouterZTE', networks: [ { network: `${ip}/32` } ] }) }); if (response.ok) { const data = await response.json(); return data.result || null; } else { return null; } }
(2) Tạo Cron trigger để tự động chạy script cập nhật IP qua DDNS mỗi 1 phút (rất nhanh).
(3) Chỉnh sửa giá trị Minutes là 1 (Chạy worker mỗi phút), sau đó nhấn Add Trigger
(4) Kết quả như thế này là hoàn tất:
4. Cập nhật DNS cho thiết bị của bạn:
IPV4:
172.64.36.1
172.64.36.2
---
Máy tính:
Các thiết bị khác tương tự
Tốt nhất là đặt lên Router tổng để áp dụng cho tất cả các thiết bị trong nhà.
5. Kết thúc
Chúc các bạn cấu hình thành công. Sử dụng DNS dạng này cảm giác lướt web rất nhanh, không bị lỗi DoH (Mikrotik DoH không ổn định).
Kiểm tra xem đã chặn quảng cáo chưa:
Link 1: Test Ad Block - Toolz (https://d3ward.github.io/toolz/adblock.html)
Link 2: AdBlock Test (https://iblockads.net/test)
Nhớ flush dns trước khi test nhé.
CMD: ipconfig /flushdns
*đã cập nhật ảnh lỗi
cách này là DNS còn Wireguard là VPN mà bác, 2 cái khác nhauDùng cách này với cách xài qua wireguard theo hướng dẫn Fioren cách nào ổn định và cho tốc độ tốt nhất vậy các b. Hiện đang xài cách trên cho Mikrotik.
em thì ko chỉnh firewall gì mà nó vẫn chặn vlxx. cay vlMình vào CF --> Gateway --> DNS location copy cái DNS over TLS rồi cài luôn vào dns của điện thoại cũng đc. Ko cần phải cài thêm app 1.1.1.1
Nhưng cho mình hỏi
Dù mình vào block traffic gõ đúng domain đó vẫn ko chặn đc. Trong khi các web khác đều chặn oke
- DNS đó cài đc cho tối đa bao nhiêu device nhỉ?
- Mình thấy chặn các web người lớn rất tốt. Nhưng có 1 web ko thể nào chặn đc (vlxx .moe)