Allow getRemoteAddress to return the PID of a connecting Unix connection
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- networking
Research direction
Start by locating the getRemoteAddress entry point used by UnixServer connections and inspect how Unix and non-Unix addresses are currently handled. Verify the available socket peer-credential behavior and existing coverage, then ensure a connecting Unix client exposes its PID while other address handling remains unchanged.
Written by the indexing model from the issue text.
Description
Currently when dealing with a UnixServer, its connections do not return a value for getRemoteAddress, the returned value is actually NULL.
I`d like it to return the PID of the connecting client. Is that something you would integrate in this library?
public function getRemoteAddress()
{
if($this->unix){
$socket = socket_import_stream($this->stream);
return socket_get_option($socket, SOL_SOCKET, 17 /*SO_PEERCRED*/);
}
return $this->parseAddress(@stream_socket_get_name($this->stream, true));
}
See http://php.net/manual/en/function.socket-get-option.php#101380
- Dominant language
- PHP
- Stars
- 1.3k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reactphp/socket
-
question
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
maintenance
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
help wanted new feature
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Support STARTTLS Openhelp wanted new feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
a11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Save States Menu Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
octobercms/october#6130 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getgrav/grav-plugin-form#656 ·