Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release #331

Merged
merged 5 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 更新日志(Changelog)

## v1.4.6

### 2024/9/20

- 优化 IPv6 测试是否支持(#328)
- 优化 404 类接口测速(#329)

- Optimize IPv6 test support (#328)
- Optimize 404 class interface speed test (#329)

## v1.4.5

### 2024/9/19
Expand Down
4 changes: 2 additions & 2 deletions config/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ open_ffmpeg = True
response_time_weight = 0.5
resolution_weight = 0.5
recent_days = 30
ipv_type = ipv4
ipv_type = 全部
domain_blacklist = epg.pw,skype.serv00.net
open_m3u_result = True
url_keywords_blacklist =
open_subscribe = False
open_subscribe = True
subscribe_urls = https://m3u.ibert.me/txt/fmml_dv6.txt,https://m3u.ibert.me/txt/o_cn.txt,https://m3u.ibert.me/txt/j_iptv.txt,https://github.moeyy.xyz/https://raw.githubusercontent.com/PizazzGY/TVBox/main/live.txt
open_multicast = True
open_multicast_tonkiang = True
Expand Down
2 changes: 1 addition & 1 deletion utils/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ async def process_sort_channel_list(data, callback=None):
"""
open_ffmpeg = config.getboolean("Settings", "open_ffmpeg")
ipv_type = config.get("Settings", "ipv_type").lower()
open_ipv6 = "ipv6" in ipv_type or "all" in ipv_type
open_ipv6 = "ipv6" in ipv_type or "all" in ipv_type or "全部" in ipv_type
ipv6_proxy = None
if open_ipv6:
ipv6_proxy = (
Expand Down
2 changes: 2 additions & 0 deletions utils/speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ async def get_speed(url, timeout=timeout, proxy=None):
end = None
try:
async with session.get(url, timeout=timeout, proxy=proxy) as response:
if response.status == 404:
return float("inf")
content = await response.read()
if content:
end = time()
Expand Down
22 changes: 12 additions & 10 deletions utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from bs4 import BeautifulSoup
from flask import render_template_string, send_file
import shutil
import requests


def format_interval(t):
Expand Down Expand Up @@ -143,18 +144,19 @@ def is_ipv6(url):

def check_ipv6_support():
"""
Check if the system supports ipv6 and if the network can access an IPv6 address
Check if the system network supports ipv6
"""
url = "https://ipv6.tokyo.test-ipv6.com/ip/?callback=?&testdomain=test-ipv6.com&testname=test_aaaa"
try:
test_socket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
test_socket.settimeout(2)
test_socket.connect(("2001:4860:4860::8888", 80))
test_socket.close()
print("Your network supports IPv6")
return True
except (socket.timeout, OSError):
print("Your network does not support IPv6, using proxy")
return False
print("Checking if your network supports IPv6...")
response = requests.get(url, timeout=15)
if response.status_code == 200:
print("Your network supports IPv6")
return True
except Exception:
pass
print("Your network does not support IPv6, using proxy instead")
return False


def check_url_ipv_type(url):
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.4.5",
"version": "1.4.6",
"name": "电视直播源更新工具"
}
Loading