Fix issue #500 - Crash due to proxy - Disable DNS check

This commit is contained in:
Thomas 2022-11-21 14:09:10 +01:00
parent 495bc70ffb
commit e8ab16747d
2 changed files with 3 additions and 3 deletions

View File

@ -1190,7 +1190,7 @@ public class Helper {
return null;
}
Proxy proxy = new Proxy(type == 0 ? Proxy.Type.HTTP : Proxy.Type.SOCKS,
new InetSocketAddress(hostVal, portVal));
InetSocketAddress.createUnresolved(hostVal, portVal));
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {

View File

@ -75,7 +75,7 @@ public class FragmentLoginMain extends Fragment {
binding = FragmentLoginMainBinding.inflate(inflater, container, false);
View root = binding.getRoot();
InstanceSocialVM instanceSocialVM = new ViewModelProvider(FragmentLoginMain.this).get(InstanceSocialVM.class);
binding.menuIcon.setOnClickListener(this::showMenu);
binding.loginInstance.setOnItemClickListener((parent, view, position, id) -> oldSearch = parent.getItemAtPosition(position).toString().trim());
binding.loginInstance.addTextChangedListener(new TextWatcher() {
@ -101,7 +101,7 @@ public class FragmentLoginMain extends Fragment {
}
if (oldSearch == null || !oldSearch.equals(s.toString().trim())) {
searchInstanceRunning = true;
InstanceSocialVM instanceSocialVM = new ViewModelProvider(FragmentLoginMain.this).get(InstanceSocialVM.class);
instanceSocialVM.getInstances(query).observe(requireActivity(), instanceSocialList -> {
binding.loginInstance.setAdapter(null);
if (instanceSocialList.instances.isEmpty()) {