wakatime / jetbrains-wakatime

IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, Goland, Rider, & WebStorm plugin for quantifying your coding.
https://wakatime.com/intellij-idea
BSD 3-Clause "New" or "Revised" License
1.13k stars 167 forks source link

Set proxy via jvm property is not recommended #182

Closed Xuanwo closed 2 years ago

Xuanwo commented 3 years ago

If the proxy is set via wakatime, IDEA will warning likes following:

image

I believe the warning is related to:

https://github.com/wakatime/jetbrains-wakatime/blob/1fbc1b8fa4b2b509b308c659a743f726c2a83ab0/src/com/wakatime/intellij/plugin/Dependencies.java#L359-L360

Maybe we can use the proxy setting provided by IDEA instead?

alanhamlett commented 3 years ago

Yes, that would be better. We just need to make sure IDEA's proxy setting is used by JVM when making http(s) requests. If not, we could use the IDEA proxy setting for storing the proxy values and just temporarily set the system JVM proxy when making requests and then un-set it after the request is completed.

Xuanwo commented 3 years ago

If not, we could use the IDEA proxy setting for storing the proxy values and just temporarily set the system JVM proxy when making requests and then un-set it after the request is completed.

I'm not particularly familiar with IDEA plugin development and I have these questions.

  1. Will the requests sent by the plugin also be used when the IDEA proxy has been configured?
  2. if not, does the plugin have an API to get the proxy already configured by IDEA?

Temporarily set the system JVM proxy for every request doesn't look so nice to me.

alanhamlett commented 2 years ago

Fixed in fa12d4ce0c922057f644253279a8701139385808 and released in v14.0.1.