[Feature] 希望能够在启动过程中允许指定使用的IP地址,以确保系统正确地绑定并使用预期的网络接口

Open
#568 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
networking

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.

Description

Is there an existing issue for this?
  • I had searched in the 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虚拟机

示意图

image

错误示意图

  • 网络接口配置:
image
  • 主要网络接口配置:
image
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!
Dominant language
Java
Stars
566
Forks
141
Avg merge
36m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arextest/arex-agent-java

All issues in arextest/arex-agent-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.