Compare commits

..

8 Commits

Author SHA1 Message Date
Kelson
20abebd623 Merge pull request #1152 from kiwix/macos13
removed temp hack
2024-10-09 17:18:52 +00:00
rgaudin
58a1af85b9 removed temp hack and unlink 2024-10-09 14:38:25 +00:00
Kelson
585f55d885 Merge pull request #1151 from kiwix/feature/fix-server-set-addr
Fix Server::setAddress
2024-10-09 14:24:46 +00:00
sgourdas
8b00c2eb22 Fix Server::setAddress 2024-10-09 12:17:01 +03:00
Kelson
c8bddd6cf4 Merge pull request #1149 from kiwix/feature/remove-ip-prefix
Remove 169.254 prefix
2024-10-09 05:25:16 +00:00
sgourdas
5d1b6274a8 Remove 169.254 prefix 2024-10-08 21:39:12 +03:00
Kelson
0de9bd0a99 Merge pull request #1141 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-10-08 16:15:40 +00:00
translatewiki.net
b62274efdd Localisation updates from https://translatewiki.net. 2024-10-07 14:06:39 +02:00
5 changed files with 15 additions and 36 deletions

View File

@@ -38,9 +38,6 @@ jobs:
- name: Install packages
run: |
brew update
brew unlink python3
# upgrade from python@3.12 to python@3.12.2 fails to overwrite those
rm -f /usr/local/bin/2to3 /usr/local/bin/2to3-3.12 /usr/local/bin/idle3 /usr/local/bin/idle3.12 /usr/local/bin/pydoc3 /usr/local/bin/pydoc3.12 /usr/local/bin/python3 /usr/local/bin/python3-config /usr/local/bin/python3.12 /usr/local/bin/python3.12-config
brew install pkg-config ninja meson
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1

View File

@@ -515,28 +515,7 @@ bool InternalServer::start() {
struct sockaddr* sockaddr = (m_ipMode==IpMode::ALL || m_ipMode==IpMode::IPV6)
? (struct sockaddr*)&sockAddr6
: (struct sockaddr*)&sockAddr4;
#ifdef _WIN32
SOCKET sock = INVALID_SOCKET;
if (m_ipMode == IpMode::ALL || m_ipMode == IpMode::IPV6) {
if ((sock = socket(AF_INET6, SOCK_STREAM, 0)) == INVALID_SOCKET) {
std::cerr << "ERROR: Failed to create IPv6 socket" << std::endl;
return false;
}
int opt = 0;
if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&opt, sizeof(opt)) != 0) {
std::cerr << "ERROR: Failed to set IPV6_V6ONLY option" << std::endl;
closesocket(sock);
return false;
}
if (::bind(sock, (struct sockaddr*)&sockAddr6, sizeof(sockAddr6)) == SOCKET_ERROR) {
std::cerr << "ERROR: Failed to bind IPv6 socket" << std::endl;
closesocket(sock);
return false;
}
}
#endif
mp_daemon = MHD_start_daemon(flags,
m_port,
NULL,
@@ -544,21 +523,14 @@ bool InternalServer::start() {
&staticHandlerCallback,
this,
MHD_OPTION_SOCK_ADDR, sockaddr,
#ifdef _WIN32
(sock == INVALID_SOCKET) ? MHD_OPTION_END : MHD_OPTION_LISTEN_SOCKET, sock,
#endif
MHD_OPTION_THREAD_POOL_SIZE, m_nbThreads,
MHD_OPTION_PER_IP_CONNECTION_LIMIT, m_ipConnectionLimit,
MHD_OPTION_END);
if (mp_daemon == nullptr) {
std::cerr << "ERROR: Unable to instantiate the HTTP daemon. The port " << m_port
<< " may already be in use, or more permissions are required to open it. "
std::cerr << "Unable to instantiate the HTTP daemon. The port " << m_port
<< " is maybe already occupied or need more permissions to be open. "
"Please try as root or with a port number higher or equal to 1024."
<< std::endl;
#ifdef _WIN32
if (sock != INVALID_SOCKET) closesocket(sock);
#endif
return false;
}
auto server_start_time = std::chrono::system_clock::now().time_since_epoch();

View File

@@ -229,7 +229,7 @@ IpAddress getBestPublicIps() {
}
}
#endif
const char* const v4prefixes[] = { "192.168", "172.16", "10.0", "169.254" };
const char* const v4prefixes[] = { "192.168", "172.16", "10.0" };
for (const auto& prefix : v4prefixes) {
for (const auto& kv : interfaces) {
const auto& interfaceIps = kv.second;

View File

@@ -60,5 +60,15 @@
"download-links-heading": "Discargar ligamines pro <b><i>{{BOOK_TITLE}}</i></b>",
"download-links-title": "Discargar libro",
"preview-book": "Previsualisation",
"unknown-error": "Error incognite"
"unknown-error": "Error incognite",
"book-category.wikibooks": "Wikilibros",
"book-category.wikinews": "Wikinovas",
"book-category.wikipedia": "Wikipedia",
"book-category.wikiquote": "Wikiquote",
"book-category.wikisource": "Wikisource",
"book-category.wikispecies": "Wikispecies",
"book-category.wikiversity": "Wikiversitate",
"book-category.wikivoyage": "Wikiviage",
"book-category.wiktionary": "Wiktionario",
"book-category.other": "Altere"
}

View File

@@ -17,7 +17,7 @@
"no-book-found": "没有符合搜索要求的图书",
"url-not-found": "在此服务器上找不到请求的 URL{{url}}",
"suggest-search": "对<a href=\"{{{SEARCH_URL}}}\">{{PATTERN}}</a>进行全文搜索",
"random-article-failure": "抱歉! 随机条目失败了 (⁠〒⁠﹏⁠〒⁠) 【好生草的表情(】",
"random-article-failure": "抱歉! 随机条目失败了 (⁠〒⁠﹏⁠〒⁠)",
"invalid-raw-data-type": "{{DATATYPE}} 对原请求无效。",
"invalid-request": "请求的URL无效{{{url}}}",
"no-value-for-arg": "参数{{ARGUMENT}}无值",