Skip to content

Instantly share code, notes, and snippets.

@Colk-tech
Last active May 1, 2024 15:57
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Colk-tech/157fd6c81032dde528d3a22434b8f3e6 to your computer and use it in GitHub Desktop.
Save Colk-tech/157fd6c81032dde528d3a22434b8f3e6 to your computer and use it in GitHub Desktop.
discord-with-proxy
#!/bin/sh
/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=http://po.cc.ibaraki-ct.ac.jp:3128
@AarenWang
Copy link

proxy setting not work on my Machine

@UrBoiSnoopy
Copy link

how do u play on a chromebook if stuff is block at shcool?

@RainYang-RY
Copy link

RainYang-RY commented Feb 13, 2022

Debian11 + Discord (Snap version)
Worked.
Added: socks5:// also works.

@Colk-tech
Copy link
Author

@wangrenjun12

proxy setting not work on my Machine

This proxy server ( http://po.cc.ibaraki-ct.ac.jp:3128 ) can be accessed from inside of my school only.
So, replace the server address instead of http://po.cc.ibaraki-ct.ac.jp:3128 to your own.

@Colk-tech
Copy link
Author

@wz1765

Debian11 + Discord (Snap version) Worked. Added: socks5:// also works.

Thank you so much for sharing worthful information!
Can I get the full of the command when you add socks5://?

@waruqi
Copy link

waruqi commented Apr 27, 2022

It does not work on my macOS. I tried http and socks5.

$ /Applications/Discord.app/Contents/MacOS/Discord --proxy-server=socks5://127.0.0.1:7890                                                                          
Discord 0.0.266
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /Users/ruki/Library/Application Support/discord/0.0.266/modules
[Modules] Module installed file path: /Users/ruki/Library/Application Support/discord/0.0.266/modules/installed.json
[Modules] Module download path: /Users/ruki/Library/Application Support/discord/0.0.266/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?
[Modules] Checking for host updates.
i[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?

@TaylorChen
Copy link

work fine

@alexxuyang
Copy link

Doesn't work on my mac.

$ /Applications/Discord.app/Contents/MacOS/Discord --proxy-server=http://127.0.0.1:7890
Discord 0.0.266
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /Users/alex/Library/Application Support/discord/0.0.266/modules
[Modules] Module installed file path: /Users/alex/Library/Application Support/discord/0.0.266/modules/installed.json
[Modules] Module download path: /Users/alex/Library/Application Support/discord/0.0.266/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?

@TaylorChen
Copy link

TaylorChen commented May 23, 2022 via email

@TaylorChen
Copy link

TaylorChen commented May 23, 2022 via email

@coinmasterlisting
Copy link

coinmasterlisting commented May 31, 2022

USE THIS:
Remove "http://" and it works! Enjoy

/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890

OR

/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=0.0.0.0:7890

@waruqi
Copy link

waruqi commented Jun 1, 2022

USE THIS: Remove "http://" and it works! Enjoy

/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890

OR

/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=0.0.0.0:7890

dose not work

$ /Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890
Discord 0.0.266
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /Users/ruki/Library/Application Support/discord/0.0.266/modules
[Modules] Module installed file path: /Users/ruki/Library/Application Support/discord/0.0.266/modules/installed.json
[Modules] Module download path: /Users/ruki/Library/Application Support/discord/0.0.266/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?
[Modules] Checking for host updates.
[Modules] Host update failed: Error: An SSL error has occurred and a secure connection to the server cannot be made. Would you like to connect to the server anyway?

@craone
Copy link

craone commented Jun 18, 2022

It does not work on my macOS which downloaded from app store.

env http_proxy="socks5://0.0.0.0:7890"  https_proxy="socks5://0.0.0.0:7890" "/Applications/Discord.app/Contents/MacOS/Discord.real" --proxy-server="socks5://0.0.0.0:7890"

@concurrentz
Copy link

Thanks, it worked well on macos

@rainbird
Copy link

http_proxy=http://127.0.0.1:8118 https_proxy=http://127.0.0.1:8118 /Applications/Discord.app/Contents/MacOS/Discord --proxy-server="http://127.0.0.1:8118"

work for me

@zeroxia
Copy link

zeroxia commented Mar 8, 2023

Does not work on Windows.

@e5st7
Copy link

e5st7 commented May 1, 2023

For Windows users reading this, there has been work done in the discord-proxy project, with the original guide in this Zhihu post.
Extract the included dll from release to the app folder at %localappdata%/Discord, add the proxy argument to a Discord.exe shortcut. If Discord doesn't start, make a shortcut to the Update.exe instead and add the argument there.

A even more convenient, experimental method would be the DiscordProxyStart project, which eliminates the need to manually replace the dll file.

@wangwendong1024
Copy link

It seems that Update.exe is written in C# language. All C# programs support the use of. config configuration items to configure process agents. Save the following content as Update.exe.config and store it in the same directory as Update.exe.

<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> </configSections> <system.net> <!--Configure fiddler local proxy--> <defaultProxy> <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:1080" usesystemdefault="false" /> </defaultProxy> </system.net> </configuration>

@zeroxia
Copy link

zeroxia commented May 6, 2023

For Windows users reading this, there has been work done in the discord-proxy project, with the original guide in this Zhihu post. Extract the included dll from release to the app folder at %localappdata%/Discord, add the proxy argument to a Discord.exe shortcut. If Discord doesn't start, make a shortcut to the Update.exe instead and add the argument there.

A even more convenient, experimental method would be the DiscordProxyStart project, which eliminates the need to manually replace the dll file.

On 2023/5/6 this still works. Although there is one issue for the helper project DiscordProxyStart:

  1. Initially C:\Users\<USERNAME>\AppData\Local\Discord contains the application in sub-folder "app-1.0.9012"
  2. Using "DiscordProxyStart.exe" you can see it successfully connects as long as you've configured your proxy correctly
  3. Then "Update.exe" downloads a newer app version "app-1.0.9013", and the process restarts
  4. Now "Update.exe" is unable to connect since the "version.dll" file is not copied into new app sub-folder "app-1.0.9013"

It seems that Update.exe is written in C# language. All C# programs support the use of. config configuration items to configure process agents. Save the following content as Update.exe.config and store it in the same directory as Update.exe.

<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> </configSections> <system.net> <!--Configure fiddler local proxy--> <defaultProxy> <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:1080" usesystemdefault="false" /> </defaultProxy> </system.net> </configuration>

This does not work. If it's that simple, there would be no need to create a project like the discord-proxy

@e5st7
Copy link

e5st7 commented May 9, 2023

@zeroxia I too have experienced the same issue when Discord updated. As a workaround, you can copy the original version.dll from the old app folder to the new app folder and start DiscordProxyStart again. Maybe it will be fixed in future releases @aiqinxuancai?

@aiqinxuancai
Copy link

aiqinxuancai commented May 10, 2023

For Windows users reading this, there has been work done in the discord-proxy project, with the original guide in this Zhihu post. Extract the included dll from release to the app folder at %localappdata%/Discord, add the proxy argument to a Discord.exe shortcut. If Discord doesn't start, make a shortcut to the Update.exe instead and add the argument there.
A even more convenient, experimental method would be the DiscordProxyStart project, which eliminates the need to manually replace the dll file.

On 2023/5/6 this still works. Although there is one issue for the helper project DiscordProxyStart:

  1. Initially C:\Users\<USERNAME>\AppData\Local\Discord contains the application in sub-folder "app-1.0.9012"
  2. Using "DiscordProxyStart.exe" you can see it successfully connects as long as you've configured your proxy correctly
  3. Then "Update.exe" downloads a newer app version "app-1.0.9013", and the process restarts
  4. Now "Update.exe" is unable to connect since the "version.dll" file is not copied into new app sub-folder "app-1.0.9013"

It seems that Update.exe is written in C# language. All C# programs support the use of. config configuration items to configure process agents. Save the following content as Update.exe.config and store it in the same directory as Update.exe.
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> </configSections> <system.net> <!--Configure fiddler local proxy--> <defaultProxy> <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:1080" usesystemdefault="false" /> </defaultProxy> </system.net> </configuration>

This does not work. If it's that simple, there would be no need to create a project like the discord-proxy

@zeroxia I too have experienced the same issue when Discord updated. As a workaround, you can copy the original version.dll from the old app folder to the new app folder and start DiscordProxyStart again. Maybe it will be fixed in future releases @aiqinxuancai?
[@e5st7]
https://github.com/aiqinxuancai/DiscordProxyStart/releases/tag/v0.0.6
This issue should have been fixed already.

@rainmote
Copy link

For the Mac version of Discord, I extracted the /Applications/Discord.app/Contents/Resources/app.asar file and found in the code that the Mac update uses electron.autoUpdater, which means the proxy settings do not take effect. My solution is to bypass the autoUpdater. Here are the steps:

  1. Edit the file /Users/admin/Library/Application\ Support/discord/settings.json and add the following two configurations:

    "SKIP_HOST_UPDATE": true,
    "SKIP_MODULE_UPDATE": true
    
  2. Run Discord with proxy parameters using the command:

    /Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890 --ignore-certificate-errors
    

@liusept
Copy link

liusept commented Jun 11, 2023

For the Mac version of Discord, I extracted the /Applications/Discord.app/Contents/Resources/app.asar file and found in the code that the Mac update uses electron.autoUpdater, which means the proxy settings do not take effect. My solution is to bypass the autoUpdater. Here are the steps:

  1. Edit the file /Users/admin/Library/Application\ Support/discord/settings.json and add the following two configurations:
    "SKIP_HOST_UPDATE": true,
    "SKIP_MODULE_UPDATE": true
    
  2. Run Discord with proxy parameters using the command:
    /Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890 --ignore-certificate-errors
    

Thanks, he works on my macos

@MdNihal05
Copy link

Hello
I use Linux ( Linux 6.5.0-kali3-amd64 ) Gnome version 44.1
How can i use discord using proxy ( with my credentials provided by college )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment