Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Proxy Settings
  • From: Jan-Patrick Osterloh <osterloh@xxxxxxxx>
  • Date: Tue, 14 May 2019 15:13:56 +0200
  • Autocrypt: addr=osterloh@xxxxxxxx; prefer-encrypt=mutual; keydata= mQINBFaYzvABEAC6kSTwexU5Zme4Zc21MF2Zy+fsv8/nLPVgeTTGCY/3RJEoqpMzd+Ox7JR3 iSMkItkxTHu6Giw8YcMNbTM5ptoSTryDRMjLXvvMTmaWhPBlv66gvy6KJwfLawkQAubJKj32 rh1/7r9eT4s7iDSTLcabyHHx/9Ogvhm7feRwOvRB9u7ukcI7m4fEDZscvVZKwlcGD3wr1OtY BQIOhhEzS6XvumVTgLBN5NgtEk5MlAmFIQaBxYDt47D1QsDu7991Z2iFTuuybqrJL0vo8PAA Sqtjo0cSQu12NqU78D3zCOG8hU+kiXKW2DdmXnmkbyH1K/yztwSpNfbbOpi17CeD1snmAAEY akTtZKkVvtTa3Xg3GQ6yU/GVxFEZ+cLDViRSStL1gi5mnRHbHY7IyoEx1W/+GYPv5ripe2aB Y9c1a9l/1bLxWXAKwbD9haCHZ19lMfvF0eGn4Li3HyB5YHnhCCapoxIJJnOuDGPvaB5H+qv1 p8cxqN7p24Z6v3NZ0b7sEtQNHnq9IvJ2sSUVpHk9hy93ZNdAg3TqrQ09kN7elXxPy3xQ5OLr Q/PZTGi8bRMSShzSm8KPZy1FKzSWbYTLOtiw6HeM2s7tl+lPVD2+UH0mWleXPfZ7iaIwKa7m XlkwUSgh2dc5LvWBVCz0LiXz1NBiqrT70czodA62l1pQYLno2wARAQABtChKYW4tUGF0cmlj ayBPc3RlcmxvaCA8b3N0ZXJsb2hAb2ZmaXMuZGU+iQJCBBMBCAAsAhsjBwsJCAcDAgEGFQgC CQoLBBYCAwECHgECF4ACGQEFAluWVmQFCQbeuvQACgkQlxtC0YJWygwFGRAAgNfQK1yfY5Wf Mzz9W0JXdQZU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ive: <https://www.eclipse.org/mailman/private/lyo-dev>
  • List-help: <mailto:lyo-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/lyo-dev>, <mailto:lyo-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/lyo-dev>, <mailto:lyo-dev-request@eclipse.org?subject=unsubscribe>
  • Openpgp: preference=signencrypt
  • User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Dear all,

thanks for the help, but after some digging, I was able to implement a simpler solution!

If anyone has a similar problem, here is what I did:

       ProxySelector.setDefault(new ProxySelector() {
                @Override
                public List<Proxy> select(URI uri) {
                    ArrayList<Proxy> list = new ArrayList<Proxy>();
                    list.add(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.de", 8080)));
                    return list;
                }

                @Override
                public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
                    logger.error("Error in ProxySelector, connection Failed: ", ioe);
                }
       });

       Authenticator.setDefault(new ProxyAuth(Config.getProxyUsername(), Config.getProxyPassword()));

That has to be set prior to the first Internet use, plus the following class for Basic Authentizication:

public class ProxyAuth extends Authenticator {
    private PasswordAuthentication auth;

    public ProxyAuth(String user, String password) {
        auth = new PasswordAuthentication(user, password == null ? new char[] {} : password.toCharArray());
    }

    protected PasswordAuthentication getPasswordAuthentication() {
        return auth;
    }
}

Best regards
Jan-Patrick



Am 07.05.2019 um 11:23 schrieb Andrii Berezovskyi:

Dear Jan-Patrick,

 

ProxyServlet is actually developed for the case when you have an adaptor that needs to act as a proxy itself. That is not what you need.

 

In general, here is how you supply an Apache HttpClient builder object to Lyo Client. And then you simply configure it to use your proxy this way. Or, maybe not so simple – I am happy not to be behind the proxy 😊 If this does not help, Jim is the expert on Lyo Client and should be able to help you.

 

Good luck!

 

--

–Andrew.

 

Från: <lyo-dev-bounces@xxxxxxxxxxx> på uppdrag av Jan-Patrick Osterloh <osterloh@xxxxxxxx>
Svara till: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Datum: tisdag, 7 maj 2019, W19 09:57
Till: "lyo-dev@xxxxxxxxxxx" <lyo-dev@xxxxxxxxxxx>
Ämne: Re: [lyo-dev] Proxy Settings

 

Dear all,

thanks for the links, I found the ninarcm and the ProxyServlet mentioned in the old discussion on the list.
https://github.com/OSLC/lyo-adaptor-ninacrm/blob/master/src/main/java/org/eclipse/lyo/samples/ninacrm/ProxyServlet.java

I'm not sure if I understand it completely, though.
1) How do I use this ProxyServlet, i.e. how do I make that this is used by the RestClient etc to use that?
2) Since the ProxyServlet is using HttpURLConnection, it should work with a proxy, if this is configured. Does this mean, the standard RestClient does use something else than HttpURLConnection? Just to confirm that this is indeed helping me with my Proxy problem...

@Andrew: I had a look at the config you send me, thanks for that. But it's not my adaptor that is behind a proxy, it's the client calling the adaptor, and I don't see how setting a proxy-mapping help in this case.


Best regards
Jan-Patrick


Am 06.05.2019 um 23:56 schrieb Jad El-Khoury:

@andrew! The link you propose below is for a generated Bugzilla adaptor based on LyoDesigner. It is incomplete, and I don’t believe it’s what the original Bugzilla code that Jan-Patrick needs.

 

http://git.eclipse.org/c/lyo/org.eclipse.lyo.docs.git was migrated to https://github.com/eclipse/lyo.docs. Refer to the “lyo-rest-workshop” to find the code for all 6 labs of the Bugzilla example.

 

Have a look within Lab1, for a pdf version of the complete tutorial.

 

Hope this help to get you started on the original proxy problem!

 

regards

______________________________

Jad El-khoury, PhD

KTH Royal Institute of Technology

School of Industrial Engineering and Management, Mechatronics Division

Brinellvägen 83, SE-100 44 Stockholm, Sweden

Phone: +46(0)8 790 6877 Mobile: +46(0)70 773 93 45

jad@xxxxxx, https://www.kth.se/profile/jad

 

From: lyo-dev-bounces@xxxxxxxxxxx <lyo-dev-bounces@xxxxxxxxxxx> On Behalf Of Andrii Berezovskyi
Sent: Monday, 6 May 2019 23:26
To: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Subject: Re: [lyo-dev] Proxy Settings

 

Dear Jan-Patrick,

 

Thanks for reporting the broken links. Good news and bad news:

 

  1. The Bugzilla example has been moved to https://github.com/OSLC/lyo-adaptor-bugzilla
  2. Mozilla landfill has been shut down, you will need your private Bugzilla installation: https://github.com/OSLC/lyo-adaptor-bugzilla/issues/12
  3. There were problems to get Bugzilla adaptor to run, I fixed them, but they don’t seem to have gotten to the repo I linked above. I have just open-sourced all three private forks we had of the Bugzilla adaptor (non-generated code, TRS support, and Lyo Store support respectively). Hope at least one of them helps you (run all of them with ‘mvn jetty:run-exploded’):
    1. https://gitlab.com/assume/lyo/se.kth.md.cpse.adaptor.bugzilla
    2. https://gitlab.com/assume/lyo/adaptor-bugzilla-trs
    3. https://gitlab.com/assume/lyo/adaptor-store-support

 

--

–Andrew.

 

Från: <lyo-dev-bounces@xxxxxxxxxxx> på uppdrag av Jan-Patrick Osterloh <osterloh@xxxxxxxx>
Svara till: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Datum: måndag, 6 maj 2019, W19 17:36
Till: "lyo-dev@xxxxxxxxxxx" <lyo-dev@xxxxxxxxxxx>
Ämne: Re: [lyo-dev] Proxy Settings

 

Dear Jad,

 

The original hint was here:

 

and from the main site

if you click on the Bugzilla example at the bottom of the page, you get

to this site:

Where it mentions to download the example from:

 

Basically, all these links to git do now work anymore, for every example

given on the main page.

 

And I can only hope, that if I find the BugZilla example, there is

indeed an example on Proxy usage, that is still working...

 

 

Best regards

Jan-Patrick

 

 

Am 06.05.2019 um 16:35 schrieb Jad El-Khoury:

Jan-Patrick

 

Can you share the links to BugZilla example that are all inaccessible? I might be able to help you find them?

 

Hope  someone can help you with the specific question too. I’m not particularly familiar with it myself.

Jad

 

On 6 May 2019, at 15:05, Jan-Patrick Osterloh <osterloh@xxxxxxxx> wrote:

 

Hi,

 

could you provide me a current link that shows how to configure a LYO

Client to connect through a proxy? I found an old thread here on the

list that links to the Bugzilla example, but the links to BugZilla

example are all inaccessible, also on the lyo page.

 

I have currently set "useSystemProxy" and setup an Authenticator, and

this works for normal http(s) access, but when I try it via

LyoClient/RestClient/ServiceProviderRegistryClient I only get

"UnknownHostExceptions".

 

Best regards

Jan-Patrick

 

--

Dipl. Inform. Jan-Patrick Osterloh

Senior Research Engineer

Human Centered Design Group

 

OFFIS e.V. - Institut für Informatik | Institute for Information Technology

             FuE Bereich Verkehr     | R&D Division Transportation

             Escherweg 2, 26121 Oldenburg - Germany

Room:        D107

Phone/Fax:   +49 441 97 22-524 / -502

E-Mail:      osterloh@xxxxxxxx

URL:         http://www.offis.de

 

Registergericht: Amtsgericht Oldenburg VR 1956

Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),

          Prof. Dr. techn. Susanne Boll-Westermann,

          Prof. Dr.-Ing. Axel Hahn,

          Prof. Dr.-Ing. Andreas Hein,

          Prof. Dr. Sebastian Lehnhoff

 

_______________________________________________

lyo-dev mailing list

To change your delivery options, retrieve your password, or unsubscribe from this list, visit

_______________________________________________

lyo-dev mailing list

To change your delivery options, retrieve your password, or unsubscribe from this list, visit

 

--

Dipl. Inform. Jan-Patrick Osterloh

Senior Research Engineer

Human Centered Design Group

 

OFFIS e.V. - Institut für Informatik | Institute for Information Technology

             FuE Bereich Verkehr     | R&D Division Transportation

             Escherweg 2, 26121 Oldenburg - Germany

Room:        D107

Phone/Fax:   +49 441 97 22-524 / -502

E-Mail:      osterloh@xxxxxxxx

URL:         http://www.offis.de

 

Registergericht: Amtsgericht Oldenburg VR 1956

Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),

          Prof. Dr. techn. Susanne Boll-Westermann,

          Prof. Dr.-Ing. Axel Hahn,

          Prof. Dr.-Ing. Andreas Hein,

          Prof. Dr. Sebastian Lehnhoff

 

_______________________________________________

lyo-dev mailing list

To change your delivery options, retrieve your password, or unsubscribe from this list, visit



_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/lyo-dev



-- 
Dipl. Inform. Jan-Patrick Osterloh
Senior Research Engineer
Human Centered Design Group
 
OFFIS e.V. - Institut für Informatik | Institute for Information Technology
             FuE Bereich Verkehr     | R&D Division Transportation
             Escherweg 2, 26121 Oldenburg - Germany
Room:        D107
Phone/Fax:   +49 441 97 22-524 / -502
E-Mail:      osterloh@xxxxxxxx
URL:         http://www.offis.de 
 
Registergericht: Amtsgericht Oldenburg VR 1956
Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),
          Prof. Dr. techn. Susanne Boll-Westermann,
          Prof. Dr.-Ing. Axel Hahn,
          Prof. Dr.-Ing. Andreas Hein,
          Prof. Dr. Sebastian Lehnhoff 
 

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/lyo-dev

-- 
Dipl. Inform. Jan-Patrick Osterloh
Senior Research Engineer
Human Centered Design Group

OFFIS e.V. - Institut für Informatik | Institute for Information Technology
             FuE Bereich Verkehr     | R&D Division Transportation
             Escherweg 2, 26121 Oldenburg - Germany
Room:        D107
Phone/Fax:   +49 441 97 22-524 / -502
E-Mail:      osterloh@xxxxxxxx
URL:         http://www.offis.de 

Registergericht: Amtsgericht Oldenburg VR 1956
Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),
          Prof. Dr. techn. Susanne Boll-Westermann,
          Prof. Dr.-Ing. Axel Hahn,
          Prof. Dr.-Ing. Andreas Hein,
          Prof. Dr. Sebastian Lehnhoff 


Back to the top