apache / apache/brpc

my_ip_cstr获取本机ip为127.0.0.1

Open
#2,084 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**

butil::my_ip_cstr() 获取本机的ip为127.0.0.1

**To Reproduce (复现方法)**

**Expected behavior (期望行为)**
期望获取到真实的ip

**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:

**Additional context/screenshots (更多上下文/截图)**

Contributor guide

Open the contributing guide

Research direction

Start at the butil::my_ip_cstr() entry point and reproduce the report in an environment where it returns 127.0.0.1. Check how the function selects the local address and document the relevant OS, compiler, brpc, and protobuf versions. Done means it returns the expected real IP without regressing other environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.