arextest / arextest/arex-agent-java
[Feature] 希望能够在启动过程中允许指定使用的IP地址,以确保系统正确地绑定并使用预期的网络接口
- Dominant language
- Java
- Stars
- 564
- Forks
- 140
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [X] I had searched in the [issues](https://github.com/arextest/arex-agent-java/issues) and found no similar issues.
### Description
在多网卡环境下,如安装了虚拟机(Vmware)或Docker时,通过引入`arex-agent.jar`启动后,发现记录机器的Host的IP地址指向了错误的网络接口。当前,系统自动选择了`bridge100`网络接口的IP地址(192.168.64.1),而不是预期使用的主网络接口`en0`的地址。
如所附的截图所示,当前系统错误地识别了网络接口。实际应使用的IP是`en0`接口上的地址,例如:10.110.2.83。
**环境信息:**
- **agent版本**:0.4.6
- **系统硬件**:M2芯片MacBook
- **其他环境**:已安装Docker和VMWare虚拟机
**示意图**:
**错误示意图**:
- 网络接口配置:
- 主要网络接口配置:
### Solution
默认处理保持不变,希望能够在启动过程中允许指定使用的IP地址,以确保系统正确地绑定并使用预期的网络接口。例如:添加启动参数-Darex.instance.ip-address=10.110.2.83。
### Related issues
_No response_
### Are you willing to submit a pull request to implement this on your own?
- [ ] Yes I am willing to submit a pull request on my own!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Java agent startup argument parsing and the code that selects the machine Host IP. Confirm how the default interface is chosen, then verify that a supplied -Darex.instance.ip-address value is used while the existing default behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100