Tue Jul 26, 2011 1:30 am
Dear Lyndon, thanks by your fast reply.
If i understand right (i'n mewbie), i must edit the .brs file and modify the networl config and add the command nc.SetProxy("http://proxy.yourcompany.com:port/"). Finally, add it to the card replacing the .brs original.
Is this code right for dinamic ip and proxy?
Thanks in advance
nc = CreateObject("roNetworkConfiguration", networkConfigurationIndex%)
if type(nc) = "roNetworkConfiguration" then
useDHCP = current_sync.LookupMetadata("client", "useDHCP")
if useDHCP = "no" then
staticIPAddress$ = current_sync.LookupMetadata("client", "staticIPAddress")
subnetMask$ = current_sync.LookupMetadata("client", "subnetMask")
broadcast$ = current_sync.LookupMetadata("client", "broadcast")
gateway$ = current_sync.LookupMetadata("client", "gateway")
dns1$ = current_sync.LookupMetadata("client", "dns1")
dns2$ = current_sync.LookupMetadata("client", "dns2")
dns3$ = current_sync.LookupMetadata("client", "dns3")
nc.SetIP4Address(staticIPAddress$)
nc.SetIP4Netmask(subnetMask$)
nc.SetIP4Broadcast(broadcast$)
nc.SetIP4Gateway(gateway$)
if dns1$ <> "" then nc.AddDNSServer(dns1$)
if dns2$ <> "" then nc.AddDNSServer(dns2$)
if dns3$ <> "" then nc.AddDNSServer(dns3$)
registrySection.Write("dhcp", "no")
registrySection.Write("sip", staticIPAddress$)
registrySection.Write("sm", subnetMask$)
registrySection.Write("gw", gateway$)
registrySection.Write("bc", broadcast$)
registrySection.Write("d1", dns1$)
registrySection.Write("d2", dns2$)
registrySection.Write("d3", dns3$)
else
nc.SetDHCP()
registrySection.Write("dhcp", "yes")
endif
if useWireless = "yes" then
nc.SetWiFiESSID(ssid$)
nc.SetObfuscatedWifiPassphrase(passphrase$)
endif
timeServer$ = current_sync.LookupMetadata("client", "timeServer")
registrySection.Write("ts", timeServer$)
print "time server in setup.brs = ";timeServer$
nc.SetTimeServer(timeServer$)
nc.SetProxy("http://proxy.yourcompany.com:port/")
success = nc.Apply()