diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de7d9f88..f241ba78d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v4.0, 2021-08-07, Fix [#2508](https://github.com/ossrs/srs/pull/2508), Support features query by API. 5.0.10 * v5.0, 2021-07-07, Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8 * v5.0, 2021-07-01, Move AUTHORS.txt to trunk for docker. 5.0.7 * v5.0, 2021-06-28, Squash: Support query lastest available version. 5.0.6 diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index 70291f4de..16db0416e 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -14,7 +14,7 @@ #include #include #include - +#include #include #include using namespace std; @@ -96,6 +96,11 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe } if (clientip.empty()) { clientip = dynamic_cast(r)->connection()->remote_ip(); + // Overwrite by ip from proxy. + string oip = srs_get_original_ip(r); + if (!oip.empty()) { + clientip = oip; + } } string api; @@ -314,6 +319,11 @@ srs_error_t SrsGoApiRtcPublish::do_serve_http(ISrsHttpResponseWriter* w, ISrsHtt } if (clientip.empty()){ clientip = dynamic_cast(r)->connection()->remote_ip(); + // Overwrite by ip from proxy. + string oip = srs_get_original_ip(r); + if (!oip.empty()) { + clientip = oip; + } } string api; diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 945e4ae7b..ea41c834a 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 9 +#define VERSION_REVISION 10 #endif