Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow players to configure X-Real-IP Header so that the regional restriction of Netease Music can be unlocked #26

Open
appe233 opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@appe233
Copy link

appe233 commented Nov 24, 2024

I'm now using the fabric version mod with mc 1.20.1. Since I'm not in the mainland most of the pieces just refuse to play. A method I used to use is appending a HTTP header "X-Real-IP" to the requests.

I tried using the same trick here by adding a new line in src/main/java/com/github/tartaricacid/netmusic/api/NetEaseMusic.java

In init()

requestPropertyData.put("X-Real-IP", SOME_IP_FROM_MAINLAND);

The trick worked, so I think it would be good if this feature can be added to the mod itself. (I know zero java and just copied the former line)

Looking forward to a more standard implementation!

@TartaricAcid TartaricAcid added the enhancement New feature or request label Nov 28, 2024
@TartaricAcid
Copy link
Owner

I plan to add a configuration file that allows adding custom request headers.
When we are finished, please try to see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants