get Proxy ip and port

Hi,
I want to get the ip proxy and port from ethernet configuration, for execute a curl comand with proxy:

do shell script “curl IPproxy portProxy …myurl”

Anybody can help me

thanks

Martin