Skip to content

Commit 3ee72ec

Browse files
committed
Merge branch 'dev'
2 parents 501d972 + 366fb04 commit 3ee72ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6560
-10201
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v6.23.0
2+
- [#3668](https://github.com/xmrig/xmrig/issues/3668) Added support for Windows ARM64.
3+
- Sync changes with XMRig v6.23.0.
4+
15
# v6.22.0
26
- [#2411](https://github.com/xmrig/xmrig/pull/2411) Added support for [Yada](https://yadacoin.io/) (`rx/yada` algorithm).
37
- [#3492](https://github.com/xmrig/xmrig/pull/3492) Fixed `--background` option on Unix systems.

CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.10)
22
project(xmrig-proxy)
33

44

@@ -9,9 +9,10 @@ option(WITH_TLS "Enable OpenSSL support" ON)
99
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
1010

1111

12-
include (CheckIncludeFile)
13-
include (cmake/os.cmake)
14-
include (src/base/base.cmake)
12+
include(CheckIncludeFile)
13+
include(cmake/cpu.cmake)
14+
include(cmake/os.cmake)
15+
include(src/base/base.cmake)
1516

1617

1718
set(HEADERS
@@ -194,3 +195,7 @@ include_directories(${UV_INCLUDE_DIR})
194195

195196
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_SYSLOG} ${HTTP_SOURCES} ${TLS_SOURCES})
196197
target_link_libraries(${CMAKE_PROJECT_NAME} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${GOOGLE_BREAKPAD_LIBS})
198+
199+
if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_GENERATOR STREQUAL Xcode)
200+
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} "$<TARGET_FILE:${CMAKE_PROJECT_NAME}>")
201+
endif()

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,24 @@
66
[![GitHub stars](https://img.shields.io/github/stars/xmrig/xmrig-proxy.svg)](https://github.com/xmrig/xmrig-proxy/stargazers)
77
[![GitHub forks](https://img.shields.io/github/forks/xmrig/xmrig-proxy.svg)](https://github.com/xmrig/xmrig-proxy/network)
88

9-
Extremely high performance Monero (XMR) Stratum protocol proxy, can easily handle over 100K connections on cheap $5 (1024 MB) virtual machine. Reduce number of pool connections up to 256 times, 100K workers become just 391 worker on pool side. Written on C++/libuv same as [XMRig](https://github.com/xmrig/xmrig) miner.
9+
This is an extremely high-performance proxy for the CryptoNote stratum protocol (including Monero and others).
10+
It can efficiently manage over 100K connections on an inexpensive, low-memory virtual machine (with just 1024 MB of RAM).
11+
The proxy significantly reduces the number of connections to the pool, decreasing 100,000 workers down to just 391 on the pool side.
12+
The codebase is shared with the [XMRig](https://github.com/xmrig/xmrig) miner.
1013

1114
## Compatibility
12-
:warning: :warning: :warning: **Nicehash support must be enabled on miner side, it mandatory.** :warning: :warning: :warning:
13-
14-
* Compatible with any Monero, Electroneum, Sumokoin and AEON pools, except **nicehash.com**.
15-
* Any miner with nicehash support, `--nicehash` option for [XMRig](https://github.com/xmrig/xmrig), `"nicehash_nonce": true,` for xmr-stak-cpu.
16-
* [Comparison](https://github.com/xmrig/xmrig-proxy/wiki/Comparison) with other proxies.
15+
Compatible with any pool and any miner that supports NiceHash.
1716

1817
## Why?
19-
This proxy designed and created for handle donation traffic from XMRig. No one other solution works fine with high connection/disconnection rate.
18+
This proxy is designed to handle donation traffic from XMRig. No other solution works well with high connection and disconnection rates.
2019

2120
## Download
2221
* Binary releases: https://github.com/xmrig/xmrig-proxy/releases
2322
* Git tree: https://github.com/xmrig/xmrig-proxy.git
24-
* Clone with `git clone https://github.com/xmrig/xmrig-proxy.git` :hammer: [Build instructions](https://github.com/xmrig/xmrig-proxy/wiki/Build).
23+
* Clone with `git clone https://github.com/xmrig/xmrig-proxy.git` :hammer: [Build instructions](https://xmrig.com/docs/proxy).
2524

2625
## Usage
27-
:boom: If you use Linux and want handle more than **1000 connections**, you need [increase limits of open files](https://github.com/xmrig/xmrig-proxy/wiki/Ubuntu-setup).
28-
29-
Use [config.xmrig.com](https://config.xmrig.com/proxy) to generate, edit or share configurations.
26+
:boom: If you are using Linux and need to manage over **1000 connections**, you must [increase the limits on open files](https://github.com/xmrig/xmrig-proxy/wiki/Ubuntu-setup).
3027

3128
### Options
3229
```
@@ -45,7 +42,9 @@ Network:
4542
--dns-ipv6 prefer IPv6 records from DNS responses
4643
--dns-ttl=N N seconds (default: 30) TTL for internal DNS cache
4744
--daemon use daemon RPC instead of pool for solo mining
45+
--daemon-zmq-port daemon's zmq-pub port number (only use it if daemon has it enabled)
4846
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)
47+
--daemon-job-timeout=N daemon job timeout in milliseconds (default: 15000)
4948
--self-select=URL self-select block templates from URL
5049
--submit-to-origin also submit solution back to self-select URL
5150
-r, --retries=N number of times to retry before switch to backup server (default: 5)
@@ -82,7 +81,6 @@ TLS:
8281
--tls-ciphersuites=S set list of available TLSv1.3 ciphersuites
8382
8483
Logging:
85-
-S, --syslog use system log for output messages
8684
-l, --log-file=FILE log all output to a file
8785
-A --access-log-file=FILE log all workers access to a file
8886
--no-color disable colored output
@@ -98,11 +96,10 @@ Misc:
9896

9997
## Donations
10098

101-
Default donation fee is 2% can be reduced to 1% or disabled via `donate-level` option. Donation fee applies only if you use more than 256 miners.
99+
The default donation fee is 2%, which can be reduced to 1% or completely disabled using the `donate-level` option. This fee applies only when you utilize more than 256 miners.
102100

103101
* XMR: `48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD`
104102

105103
## Contacts
106104
* support@xmrig.com
107-
* [reddit](https://www.reddit.com/user/XMRig/)
108-
* [twitter](https://twitter.com/xmrig_dev)
105+
* [X](https://x.com/xmrig_dev)

cmake/cpu.cmake

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
2+
set(XMRIG_64_BIT ON)
3+
add_definitions(-DXMRIG_64_BIT)
4+
else()
5+
set(XMRIG_64_BIT OFF)
6+
endif()
7+
8+
if (XMRIG_64_BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
9+
add_definitions(-DRAPIDJSON_SSE2)
10+
endif()
11+
12+
add_definitions(-DRAPIDJSON_WRITE_DEFAULT_FLAGS=6) # rapidjson::kWriteNanAndInfFlag | rapidjson::kWriteNanAndInfNullFlag
13+
14+
if (ARM_V8)
15+
set(ARM_TARGET 8)
16+
elseif (ARM_V7)
17+
set(ARM_TARGET 7)
18+
endif()
19+
20+
if (NOT ARM_TARGET)
21+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64|armv8-a)$")
22+
set(ARM_TARGET 8)
23+
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|armv7ve)$")
24+
set(ARM_TARGET 7)
25+
endif()
26+
endif()
27+
28+
if (ARM_TARGET AND ARM_TARGET GREATER 6)
29+
set(XMRIG_ARM ON)
30+
add_definitions(-DXMRIG_ARM=${ARM_TARGET})
31+
32+
message(STATUS "Use ARM_TARGET=${ARM_TARGET} (${CMAKE_SYSTEM_PROCESSOR})")
33+
34+
if (ARM_TARGET EQUAL 8 AND (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang))
35+
set(ARM8_CXX_FLAGS "-march=armv8-a")
36+
endif()
37+
endif()

cmake/flags.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
5252
add_definitions(/DHAVE_ROTR)
5353

5454
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
55-
5655
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
5756
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-overloaded-virtual")
5857

58+
if ((WIN32 AND ARM_TARGET) OR BUILD_STATIC)
59+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
60+
endif()
5961
endif()

cmake/os.cmake

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,32 @@ else()
2020
endif()
2121
endif()
2222

23-
2423
if (XMRIG_OS_WIN)
25-
add_definitions(/DWIN32)
26-
add_definitions(/DXMRIG_OS_WIN)
24+
add_definitions(-DWIN32 -DXMRIG_OS_WIN)
2725
elseif(XMRIG_OS_APPLE)
28-
add_definitions(/DXMRIG_OS_APPLE)
26+
add_definitions(-DXMRIG_OS_APPLE)
2927

3028
if (XMRIG_OS_IOS)
31-
add_definitions(/DXMRIG_OS_IOS)
29+
add_definitions(-DXMRIG_OS_IOS)
3230
else()
33-
add_definitions(/DXMRIG_OS_MACOS)
31+
add_definitions(-DXMRIG_OS_MACOS)
32+
endif()
33+
34+
if (XMRIG_ARM)
35+
set(WITH_SECURE_JIT ON)
3436
endif()
3537
elseif(XMRIG_OS_UNIX)
36-
add_definitions(/DXMRIG_OS_UNIX)
38+
add_definitions(-DXMRIG_OS_UNIX)
3739

3840
if (XMRIG_OS_ANDROID)
39-
add_definitions(/DXMRIG_OS_ANDROID)
41+
add_definitions(-DXMRIG_OS_ANDROID)
4042
elseif (XMRIG_OS_LINUX)
41-
add_definitions(/DXMRIG_OS_LINUX)
43+
add_definitions(-DXMRIG_OS_LINUX)
4244
elseif (XMRIG_OS_FREEBSD)
43-
add_definitions(/DXMRIG_OS_FREEBSD)
45+
add_definitions(-DXMRIG_OS_FREEBSD)
4446
endif()
4547
endif()
4648

47-
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
48-
set(XMRIG_64_BIT ON)
49-
add_definitions(-DXMRIG_64_BIT)
50-
else()
51-
set(XMRIG_64_BIT OFF)
49+
if (WITH_SECURE_JIT)
50+
add_definitions(-DXMRIG_SECURE_JIT)
5251
endif()

src/3rdparty/epee/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier.
1+
epee - is a small library of helpers, wrappers, tools and so on, used to make my life easier.

src/3rdparty/epee/span.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ namespace epee
145145
span<const std::uint8_t> to_byte_span(const span<const T> src) noexcept
146146
{
147147
static_assert(!has_padding<T>(), "source type may have padding");
148-
return {reinterpret_cast<const std::uint8_t*>(src.data()), src.size_bytes()};
148+
return {reinterpret_cast<const std::uint8_t*>(src.data()), src.size_bytes()};
149149
}
150150

151151
//! \return `span<const std::uint8_t>` which represents the bytes at `&src`.

src/3rdparty/fmt/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Examples
8181
.. code:: c++
8282

8383
#include <fmt/core.h>
84-
84+
8585
int main() {
8686
fmt::print("Hello, world!\n");
8787
}
@@ -293,11 +293,11 @@ Projects using this library
293293
An open-source library for mathematical programming
294294

295295
* `Aseprite <https://github.com/aseprite/aseprite>`_:
296-
Animated sprite editor & pixel art tool
296+
Animated sprite editor & pixel art tool
297297

298298
* `AvioBook <https://www.aviobook.aero/en>`_: A comprehensive aircraft
299299
operations suite
300-
300+
301301
* `Celestia <https://celestia.space/>`_: Real-time 3D visualization of space
302302

303303
* `Ceph <https://ceph.com/>`_: A scalable distributed storage system
@@ -351,7 +351,7 @@ Projects using this library
351351

352352
* `quasardb <https://www.quasardb.net/>`_: A distributed, high-performance,
353353
associative database
354-
354+
355355
* `Quill <https://github.com/odygrd/quill>`_: Asynchronous low-latency logging library
356356

357357
* `QKW <https://github.com/ravijanjam/qkw>`_: Generalizing aliasing to simplify

src/3rdparty/getopt/getopt.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* DISCLAIMER
44
* This file is part of the mingw-w64 runtime package.
55
*
6-
* The mingw-w64 runtime package and its code is distributed in the hope that it
7-
* will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
8-
* IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
6+
* The mingw-w64 runtime package and its code is distributed in the hope that it
7+
* will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
8+
* IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
99
* warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
*/
1111
/*
@@ -109,11 +109,7 @@ char *optarg; /* argument associated with option */
109109
extern char __declspec(dllimport) *__progname;
110110
#endif
111111

112-
#ifdef __CYGWIN__
113112
static char EMSG[] = "";
114-
#else
115-
#define EMSG ""
116-
#endif
117113

118114
static int getopt_internal(int, char * const *, const char *,
119115
const struct option *, int *, int);

0 commit comments

Comments
 (0)