mirror of
https://github.com/bytedance/g3.git
synced 2026-05-19 16:28:21 +00:00
g3proxy: deprecate transmute_udp_echo_ip in socks proxy server config
This commit is contained in:
parent
bca0b70ba6
commit
16478d0c32
3 changed files with 15 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ v1.11.8:
|
|||
- BUG FIX: fix panic when detect DNS over TLS traffic
|
||||
- Deprecated: the following config options are deprecated:
|
||||
- emit_duration in statsd config, use emit_interval instead
|
||||
- auto_reply_local_ip_map in socks server config, use transmute_udp_echo_ip instead
|
||||
- untrusted_read_limit in server config, use untrusted_read_speed_limit instead
|
||||
- tcp_conn_speed_limit/tcp_conn_limit in user config, use tcp_sock_speed_limit instead
|
||||
- udp_relay_speed_limit/udp_relay_limit in user config, use udp_sock_speed_limit instead
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use std::time::Duration;
|
|||
|
||||
use anyhow::{Context, anyhow};
|
||||
use ascii::AsciiString;
|
||||
use log::warn;
|
||||
use rustc_hash::FxHashMap;
|
||||
use yaml_rust::{Yaml, yaml};
|
||||
|
||||
|
|
@ -304,7 +305,7 @@ impl SocksProxyServerConfig {
|
|||
self.task_log_flush_interval = Some(interval);
|
||||
Ok(())
|
||||
}
|
||||
"transmute_udp_echo_ip" | "auto_reply_local_ip_map" => {
|
||||
"transmute_udp_echo_ip" => {
|
||||
if let Yaml::Hash(_) = v {
|
||||
let map = g3_yaml::value::as_hashmap(
|
||||
v,
|
||||
|
|
@ -320,6 +321,10 @@ impl SocksProxyServerConfig {
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
"auto_reply_local_ip_map" => {
|
||||
warn!("deprecated config key '{k}', please use 'transmute_udp_echo_ip' instead");
|
||||
self.set("transmute_udp_echo_ip", v)
|
||||
}
|
||||
_ => Err(anyhow!("invalid key {k}")),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,13 @@ If no matched key found in the map, the unspecified ip address of the same famil
|
|||
|
||||
For bool value, an empty map will be used if set to true, or disabled if set to false.
|
||||
|
||||
**default**: not set, **alias**: auto_reply_local_ip_map
|
||||
**default**: not set
|
||||
|
||||
.. versionchanged:: 1.7.19 change option name to transmute_udp_echo_ip
|
||||
.. versionchanged:: 1.9.9 allow bool value and change to use unspecified ip if no match records
|
||||
|
||||
auto_reply_local_ip_map
|
||||
-----------------------
|
||||
|
||||
**deprecated**
|
||||
|
||||
.. versionchanged:: 1.11.8 deprecated, use transmute_udp_echo_ip instead
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue