maxrave-dev / maxrave-dev/SimpMusic
Socks proxy authentication is not implemented
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 11.4k
- Forks
- 599
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 7
Description
Duplicate Check
- I confirm I searched for existing reports and found no duplicates.
Describe the Bug
Socks requires its own authenticator, otherwise it defaults to using default credentials user=root;pass={empty}.
Sample implementation:
import java.net.Authenticator
import java.net.PasswordAuthentication
private fun configureSocksProxyAuth(
proxyConfig: ProxyConfig
) {
val auth = proxyConfig.auth
if (auth !is ProxyAuth.Basic) return
val username = auth.username
val passwordChars = (auth.password ?: "").toCharArray() // username-only if null
// WARNING: global for the whole JVM/app process
Authenticator.setDefault(object : Authenticator() {
override fun getPasswordAuthentication(): PasswordAuthentication? {
if (requestorType == RequestorType.PROXY &&
requestingHost.equals(proxyConfig.host, ignoreCase = true) &&
requestingPort == proxyConfig.port
) {
return PasswordAuthentication(username, passwordChars)
}
return null
}
})
}
Steps to Reproduce
- Set socks proxy credentials in the settings
- Restart app
- Observe in the socks server logs that SimpMusic is trying to authenticate using default
user=root; pass={empty}credentials, not the ones set in the settings
Expected Behavior
SimpMusic authenticates to the socks proxy server using set credentials
App Version
1.1.1
Android Version
10
Device Model
Android
Custom ROM
- I am using a custom ROM
Custom ROM Name (if applicable)
No response
Screenshots (optional)
No response
Log / Error Details
No response
Contributor guide
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.
Research direction
Start by locating the SOCKS proxy configuration and authentication entry point used by the settings flow. Reproduce the issue with credentials configured and check the SOCKS server logs. Done means the configured username and password are used instead of the default root and empty credentials.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100