in our company we are using a proxy environment.
Your code currently doesn't have support for this. I found some lines of code to work with Apache HttpClient 4.x:
Add something like
HttpHost proxy = new HttpHost(myProxyHost, myProxyPort, "http");
new AuthScope(myProxyHost, myProxyPort),
new UsernamePasswordCredentials(myUsername, myPassword));
Perhaps these credentials and proxy settings should add as a part of the MediaWikiBot constructor.
Or you may have a better idea.