@@ -623,22 +623,22 @@ public static long getAllocatedMemory(long minimum, long available, boolean auto
623623 }
624624
625625 public static ProxyOption getProxyOption () {
626- if (!config ().hasProxy () || config ().getProxyType () == null ) {
626+ if (!config ().hasProxyProperty (). get () || config ().proxyTypeProperty (). get () == null ) {
627627 return ProxyOption .Default .INSTANCE ;
628628 }
629629
630- return switch (config ().getProxyType ()) {
630+ return switch (config ().proxyTypeProperty (). get ()) {
631631 case DIRECT -> ProxyOption .Direct .INSTANCE ;
632632 case HTTP , SOCKS -> {
633- String proxyHost = config ().getProxyHost ();
634- int proxyPort = config ().getProxyPort ();
633+ String proxyHost = config ().proxyHostProperty (). get ();
634+ int proxyPort = config ().proxyPortProperty (). get ();
635635
636636 if (StringUtils .isBlank (proxyHost ) || proxyPort < 0 || proxyPort > 0xFFFF ) {
637637 yield ProxyOption .Default .INSTANCE ;
638638 }
639639
640- String proxyUser = config ().getProxyUser ();
641- String proxyPass = config ().getProxyPass ();
640+ String proxyUser = config ().proxyUserProperty (). get ();
641+ String proxyPass = config ().proxyPassProperty (). get ();
642642
643643 if (StringUtils .isBlank (proxyUser )) {
644644 proxyUser = null ;
@@ -647,7 +647,7 @@ public static ProxyOption getProxyOption() {
647647 proxyPass = "" ;
648648 }
649649
650- if (config ().getProxyType () == Proxy .Type .HTTP ) {
650+ if (config ().proxyTypeProperty (). get () == Proxy .Type .HTTP ) {
651651 yield new ProxyOption .Http (proxyHost , proxyPort , proxyUser , proxyPass );
652652 } else {
653653 yield new ProxyOption .Socks (proxyHost , proxyPort , proxyUser , proxyPass );
0 commit comments