Skip to content
View in the app

A better way to browse. Learn more.

hosang I.T.

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

wildweaselmi

MyWiseGuys
  • Joined

  • Last visited

Everything posted by wildweaselmi

  1. How To - Click Start, Click Run and enter the command Click OK Run commands Calc - Calculator Cfgwiz32 - ISDN Configuration Wizard Charmap - Character Map Chkdisk - Repair damaged files Cleanmgr - Cleans up hard drives Clipbrd - Windows Clipboard viewer Cmd - Opens a new Command Window (cmd.exe) Control - Displays Control Panel Dcomcnfg - DCOM user security Debug - Assembly language programming tool Defrag - Defragmentation tool Drwatson - Records programs crash & snapshots Dxdiag - DirectX Diagnostic Utility Explorer - Windows Explorer Fontview - Graphical font viewer Ftp - ftp.exe program Hostname - Returns Computer's name Ipconfig - Displays IP configuration for all network adapters Jview - Microsoft Command-line Loader for Java classes MMC - Microsoft Management Console Msconfig - Configuration to edit startup files Msinfo32 - Microsoft System Information Utility Nbtstat - Displays stats and current connections using NetBios over TCP/IP Netstat - Displays all active network connections Nslookup- Returns your local DNS server Ping - Sends data to a specified host/IP Regedit - registry Editor Regsvr32 - register/de-register DLL/OCX/ActiveX Regwiz - Reistration wizard Sfc /scannow - Sytem File Checker Sndrec32 - Sound Recorder Sndvol32 - Volume control for soundcard Sysedit - Edit system startup files (config.sys, autoexec.bat, win.ini, etc.) Systeminfo - display various system information in text console Taskmgr - Task manager Telnet - Telnet program Taskkill - kill processes using command line interface Tskill - reduced version of Taskkill from Windows XP Home Tracert - Traces and displays all paths required to reach an internet host Winchat - simple chat program for Windows networks Winipcfg - Displays IP configuration Management Consoles certmgr.msc - Certificate Manager ciadv.msc - Indexing Service compmgmt.msc - Computer management devmgmt.msc - Device Manager dfrg.msc - Defragment diskmgmt.msc - Disk Management fsmgmt.msc - Folder Sharing Management eventvwr.msc - Event Viewer gpedit.msc - Group Policy -XP Pro only iis.msc - Internet Information Services lusrmgr.msc - Local Users and Groups mscorcfg.msc - Net configurations ntmsmgr.msc - Removable Storage perfmon.msc - Performance Manager secpol.msc - Local Security Policy services.msc - System Services wmimgmt.msc - Windows Management Shortcuts access.cpl - Accessibility Options hdwwiz.cpl - Add New Hardware Wizard appwiz.cpl - dd/Remove Programs timedate.cpl - Date and Time Properties desk.cpl - Display Properties inetcpl.cpl - Internet Properties joy.cpl - Joystick Properties main.cpl keboard - Keyboard Properties main.cpl - Mouse Properties ncpa.cpl - Network Connections ncpl.cpl - Network Properties telephon.cpl - Phone and Modem options powercfg.cpl - Power Management intl.cpl - Regional settings mmsys.cpl sounds - Sound Properties mmsys.cpl - Sounds and Audio Device Properties sysdm.cpl - System Properties nusrmgr.cpl - User settings firewall.cpl - Firewall Settings (sp2) wscui.cpl - Security Center (sp2) Windows Environment Commands %ALLUSERSPROFILE% - Open the All User's Profile %HomeDrive% - Opens your home drive e.g. C:\ %UserProfile% - Opens you User's Profile %temp% Opens - temporary file Folder %systemroot% - Opens Windows folder Wupdmgr - Takes you to Microsoft Windows Update General keyboard shortcuts CTRL+C(Copy) CTRL+X (Cut) CTRL+Z (Undo) DELETE (Delete) SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin) CTRL while dragging an item (Copy the selected item) CTRL+SHIFT while dragging an item (Create a shortcut to the selected item) F2 key (Rename the selected item) CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word) CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word) CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph) CTRL+SHIFT with any of the arrow keys (Highlight a block of text) CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document) CTRL+A (Select all) F3 key (Search for a file or a folder) ALT+ENTER (View the properties for the selected item) ALT+F4 (Close the active item, or quit the active program) ALT+ENTER (Display the properties of the selected object) ALT+SPACEBAR (Open the shortcut menu for the active window) CTRL+F4 (Close the active document in programs that enable you to have multiple documents open simultaneously) ALT+TAB (Switch between the open items) ALT+ESC (Cycle through items in the order that they had been opened) F6 key (Cycle through the screen elements in a window or on the desktop) F4 key (Display the Address bar list in My Computer or Windows Explorer) SHIFT+F10 (Display the shortcut menu for the selected item) ALT+SPACEBAR (Display the System menu for the active window) CTRL+ESC (Display the Start menu) ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command) F10 key (Activate the menu bar in the active program) RIGHT ARROW (Open the next menu to the right, or open a submenu) LEFT ARROW (Open the next menu to the left, or close a submenu) F5 key (Update the active window) BACKSPACE (View the folder one level up in My Computer or Windows Explorer) ESC (Cancel the current task) SHIFT when you insert a CD-ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing) CTRL+SHIFT+ESC (Open Task Manager) Dialog box keyboard shortcuts If you press SHIFT+F8 in extended selection list boxes, you enable extended selection mode. In this mode, you can use an arrow key to move a cursor without changing the selection. You can press CTRL+SPACEBAR or SHIFT+SPACEBAR to adjust the selection. To cancel extended selection mode, press SHIFT+F8 again. Extended selection mode cancels itself when you move the focus to another control. CTRL+TAB (Move forward through the tabs) CTRL+SHIFT+TAB (Move backward through the tabs) TAB (Move forward through the options) SHIFT+TAB (Move backward through the options) ALT+Underlined letter (Perform the corresponding command or select the corresponding option) ENTER (Perform the command for the active option or button) SPACEBAR (Select or clear the check box if the active option is a check box) Arrow keys (Select a button if the active option is a group of option buttons) F1 key (Display Help) F4 key (Display the items in the active list) BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box) Microsoft natural keyboard shortcuts Windows Logo+BREAK (Display the System Properties dialog box) Windows Logo+D (Display the desktop) Windows Logo+M (Minimize all of the windows) Windows Logo+SHIFT+M (Restore the minimized windows) Windows Logo+E (Open My Computer) Windows Logo+F (Search for a file or a folder) CTRL+Windows Logo+F (Search for computers) Windows Logo+F1 (Display Windows Help) Windows Logo+ L (Lock the keyboard) Windows Logo+R (Open the Run dialog box) Windows Logo+U (Open Utility Manager) Accessibility keyboard shortcuts Right SHIFT for eight seconds (Switch FilterKeys either on or off) Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off) Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off) SHIFT five times (Switch the StickyKeys either on or off) NUM LOCK for five seconds (Switch the ToggleKeys either on or off) Windows Logo +U (Open Utility Manager) Windows Explorer keyboard shortcuts END (Display the bottom of the active window) HOME (Display the top of the active window) NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder) NUM LOCK+Plus sign (+) (Display the contents of the selected folder) NUM LOCK+Minus sign (-) (Collapse the selected folder) LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder) RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder) Shortcut keys for Character Map After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts RIGHT ARROW (Move to the right or to the beginning of the next line) LEFT ARROW (Move to the left or to the end of the previous line) UP ARROW (Move up one row) DOWN ARROW (Move down one row) PAGE UP (Move up one screen at a time) PAGE DOWN (Move down one screen at a time) HOME (Move to the beginning of the line) END (Move to the end of the line) CTRL+HOME (Move to the first character) CTRL+END (Move to the last character) SPACEBAR (Switch between Enlarged and Normal mode when a character is selected) Microsoft Management Console (MMC) main window keyboard shortcuts • CTRL+O (Open a saved console) CTRL+N (Open a new console) CTRL+S (Save the open console) CTRL+M (Add or remove a console item) CTRL+W (Open a new window) F5 key (Update the content of all console windows) ALT+SPACEBAR (Display the MMC window menu) ALT+F4 (Close the console) • ALT+A (Display the Action menu) ALT+V (Display the View menu) ALT+F (Display the File menu) ALT+O (Display the Favorites menu) MMC console window keyboard shortcuts CTRL+P (Print the current page or active pane) ALT+Minus sign (-) (Display the window menu for the active console window) SHIFT+F10 (Display the Action shortcut menu for the selected item) F1 key (Open the Help topic, if any, for the selected item) F5 key (Update the content of all console windows) CTRL+F10 (Maximize the active console window) CTRL+F5 (Restore the active console window) ALT+ENTER (Display the Properties dialog box, if any, for the selected item) F2 key (Rename the selected item) CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console) Remote desktop connection navigation CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box) ALT+PAGE UP (Switch between programs from left to right) ALT+PAGE DOWN (Switch between programs from right to left) ALT+INSERT (Cycle through the programs in most recently used order) ALT+HOME (Display the Start menu) CTRL+ALT+BREAK (Switch the client computer between a window and a full screen) ALT+DELETE (Display the Windows menu) CTRL+ALT+Minus sign (-) (Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer.) CTRL+ALT+Plus sign (+) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.) Microsoft Internet Explorer navigation CTRL+B (Open the Organize Favorites dialog box) CTRL+E (Open the Search bar) CTRL+F (Start the Find utility) CTRL+H (Open the History bar) CTRL+I (Open the Favorites bar) CTRL+L (Open the Open dialog box) CTRL+N (Start another instance of the browser with the same Web address) CTRL+O (Open the Open dialog box, the same as CTRL+L) CTRL+R (Update the current Web page) CTRL+ CTRL+P (Open the Print dialog box) W (Close the current window) Note Some keyboard shortcuts may not work if StickyKeys is turned on in Accessibility Options, Some of the Terminal Services client shortcuts that are similar to the shortcuts in Remote Desktop Sharing are not available when you use Remote Assistance in Windows XP Home Edition.
  2. To share the printer, Open the Printers and Faxes folder on the computer that was connected to the printer. To open the Printers and Faxes folder Click Start and then click Control Panel. Click Printers and Other Hardware, and then click Printers and Faxes. In the Printers and Faxes folder, Click the printer's icon and, in the tasks pane, Click Share This Printer. Open the printer's Properties dialog box, and click on the Sharing tab. Click Share Name, and then clicked OK. That's it—the printer is immediately available for other computers to use. To connect to the printer from different machine Open Control Panel, and clicked Printers and Other Hardware. Click Add a Printer. Instead of adding a local printer, though, Click Printer Connection and then browse the network for the printer. The whole process should take less than a minute before you are printing to the network printer as though it was connected to the computer.
  3. To share the printer, Open the Printers and Faxes folder on the computer that was connected to the printer. To open the Printers and Faxes folder Click Start and then click Control Panel. Click Printers and Other Hardware, and then click Printers and Faxes. In the Printers and Faxes folder, Click the printer's icon and, in the tasks pane, Click Share This Printer. Open the printer's Properties dialog box, and click on the Sharing tab. Click Share Name, and then clicked OK. That's it—the printer is immediately available for other computers to use. To connect to the printer from different machine Open Control Panel, and clicked Printers and Other Hardware. Click Add a Printer. Instead of adding a local printer, though, Click Printer Connection and then browse the network for the printer. The whole process should take less than a minute before you are printing to the network printer as though it was connected to the computer.
  4. Shared on the network (Read or Read and Write) To configure a folder to be shared on the network, follow these steps: Right-click the folder, and then click Sharing and Security Click to select the Share this folder on the network check box, and then click OK. Click to clear the Allow network users to change my files check box, and then click OK. (If Read-Only Access (Level 4) is required) Local NTFS Permissions: Owner: Full Control Administrators: Full Control System: Full Control Everyone: Change (Level 5 Read-Write) Everyone: Read (Level 4 Read-Only) Network Share Permissions: Everyone: Full Control (Level 5 Read-Write) Everyone: Read (Level 4 Read-Only) Note All NTFS permissions that refer to Everyone include the Guest account. Shared folders (Level 4(read-only and Level 5(read-write)) cannot be made private until they are unshared. To map a network drive from command line: Click Start, and then click Run. In the Open box, type cmd. Type net use x: \\computer name\share name, where x: is the drive letter you want to assign to the shared resource.
  5. Shared on the network (Read or Read and Write) To configure a folder to be shared on the network, follow these steps: Right-click the folder, and then click Sharing and Security Click to select the Share this folder on the network check box, and then click OK. Click to clear the Allow network users to change my files check box, and then click OK. (If Read-Only Access (Level 4) is required) Local NTFS Permissions: Owner: Full Control Administrators: Full Control System: Full Control Everyone: Change (Level 5 Read-Write) Everyone: Read (Level 4 Read-Only) Network Share Permissions: Everyone: Full Control (Level 5 Read-Write) Everyone: Read (Level 4 Read-Only) Note All NTFS permissions that refer to Everyone include the Guest account. Shared folders (Level 4(read-only and Level 5(read-write)) cannot be made private until they are unshared. To map a network drive from command line: Click Start, and then click Run. In the Open box, type cmd. Type net use x: \\computer name\share name, where x: is the drive letter you want to assign to the shared resource.
  6. This tutorial will detail the steps needed to properly configure network address translation (NAT) on a Cisco IOS router. Network Address Translation is a way for users on an internal network to share one or more external (often public) IP addresses. This tutorial will focus on the sharing of a single external IP address which is often referred to as port address translation (PAT). The following information is required for NAT: External IP address to be NAT'd: 99.99.99.99/24 Internal IP address: 192.168.0.1/24 Running the commands in IOS MyWiseGuys#config t MyWiseGuys(config)#int fa0/0 MyWiseGuys(config-if)#ip add 192.168.0.1 255.255.255.0 MyWiseGuys(config-if)#no shut MyWiseGuys(config-if)#int fa0/1 MyWiseGuys(config-if)#ip add 99.99.99.99 255.255.255.0 MyWiseGuys(config-if)#no shut MyWiseGuys(config-if)#exit MyWiseGuys(config)#access-1ist 1 permit 192.168.0.0 0.0.0.255 MyWiseGuys(config)#ip nat inside source list 1 interface fa0/1 overload MyWiseGuys(config)#int fa0/0 MyWiseGuys(config-if)#ip nat inside MyWiseGuys(config-if)#int fa0/1 MyWiseGuys(config-if)#ip nat outside MyWiseGuys(config-if)#exit MyWiseGuys(config)#exit MyWiseGuys#copy runn start c:\ping 192.168.0.1 c:\ping 99.99.99.99 MyWiseGuys#sh ip nat translations show ip nat translations Field Descriptions Pro = Protocol of the port identifying the address. Inside global = The legitimate IP address that represents one or more inside local IP addresses to the outside world. Inside local = The IP address assigned to a host on the inside network; probably not a legitimate address assigned by the Network Interface Card (NIC) or service provider. Outside local = IP address of an outside host as it appears to the inside network; probably not a legitimate address assigned by the NIC or service provider. Outside global = The IP address assigned to a host on the outside network by its owner. create = How long ago the entry was created (in hours:minutes:seconds). use = How long ago the entry was last used (in hours:minutes:seconds). flags = Indication of the type of translation. Possible flags are: extended—Extended translation static—Static translation destination—Rotary translation outside—Outside translation timing out—Translation will no longer be used, due to a TCP finish (FIN) or reset (RST) flag. Other related commands clear ip nat translation Clears dynamic NAT translations from the translation table. ip nat Designates that traffic originating from or destined for the interface is subject to NAT. ip nat inside destination Enables NAT of the inside destination address. ip nat inside source Enables NAT of the inside source address. ip nat outside source Enables NAT of the outside source address. ip nat pool Defines a pool of IP addresses for NAT. ip nat service Enables a port other than the default port. show ip nat statistics Displays NAT statistics. Following attachment is from Cisco Systems (Verifying NAT Operation and Basic NAT Troubleshooting) 13.pdf 13.pdf
  7. This tutorial will detail the steps needed to properly configure network address translation (NAT) on a Cisco IOS router. Network Address Translation is a way for users on an internal network to share one or more external (often public) IP addresses. This tutorial will focus on the sharing of a single external IP address which is often referred to as port address translation (PAT). The following information is required for NAT: External IP address to be NAT'd: 99.99.99.99/24 Internal IP address: 192.168.0.1/24 Running the commands in IOS MyWiseGuys#config t MyWiseGuys(config)#int fa0/0 MyWiseGuys(config-if)#ip add 192.168.0.1 255.255.255.0 MyWiseGuys(config-if)#no shut MyWiseGuys(config-if)#int fa0/1 MyWiseGuys(config-if)#ip add 99.99.99.99 255.255.255.0 MyWiseGuys(config-if)#no shut MyWiseGuys(config-if)#exit MyWiseGuys(config)#access-1ist 1 permit 192.168.0.0 0.0.0.255 MyWiseGuys(config)#ip nat inside source list 1 interface fa0/1 overload MyWiseGuys(config)#int fa0/0 MyWiseGuys(config-if)#ip nat inside MyWiseGuys(config-if)#int fa0/1 MyWiseGuys(config-if)#ip nat outside MyWiseGuys(config-if)#exit MyWiseGuys(config)#exit MyWiseGuys#copy runn start c:\ping 192.168.0.1 c:\ping 99.99.99.99 MyWiseGuys#sh ip nat translations show ip nat translations Field Descriptions Pro = Protocol of the port identifying the address. Inside global = The legitimate IP address that represents one or more inside local IP addresses to the outside world. Inside local = The IP address assigned to a host on the inside network; probably not a legitimate address assigned by the Network Interface Card (NIC) or service provider. Outside local = IP address of an outside host as it appears to the inside network; probably not a legitimate address assigned by the NIC or service provider. Outside global = The IP address assigned to a host on the outside network by its owner. create = How long ago the entry was created (in hours:minutes:seconds). use = How long ago the entry was last used (in hours:minutes:seconds). flags = Indication of the type of translation. Possible flags are: extended—Extended translation static—Static translation destination—Rotary translation outside—Outside translation timing out—Translation will no longer be used, due to a TCP finish (FIN) or reset (RST) flag. Other related commands clear ip nat translation Clears dynamic NAT translations from the translation table. ip nat Designates that traffic originating from or destined for the interface is subject to NAT. ip nat inside destination Enables NAT of the inside destination address. ip nat inside source Enables NAT of the inside source address. ip nat outside source Enables NAT of the outside source address. ip nat pool Defines a pool of IP addresses for NAT. ip nat service Enables a port other than the default port. show ip nat statistics Displays NAT statistics. Following attachment is from Cisco Systems (Verifying NAT Operation and Basic NAT Troubleshooting) 13.pdf 13.pdf
  8. Tried to access the site via the frontend or the ACP and I received an Internal Server Error (500) Why? Two thumbs up to IPS support which helped me in a matter of minutes
  9. Tried to access the site via the frontend or the ACP and I received an Internal Server Error (500) Why? Two thumbs up to IPS support which helped me in a matter of minutes
  10. If you are having difficulties getting any Internet game, server, or application to function properly, consider exposing one PC to the Internet using DeMilitarized Zone (DMZ) hosting. This option is available when an application requires too many ports or when you are not sure which port services to use. Make sure you disable all the forwarding entries if you want to successfully use DMZ hosting, since forwarding has priority over DMZ hosting. (In other words, data that enters the Router will be checked first by the forwarding settings. If the port number that the data enters from does not have port forwarding, then the Router will send the data to whichever PC or network device you set for DMZ hosting.) Follow these steps to set DMZ hosting: Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Disable or remove the entries you have entered for forwarding. Keep this information in case you want to use it at a later time. Click the DMZ tab. Enter the Ethernet adapter’s IP address of the computer you want exposed to the Internet. This will bypass the NAT security for that computer. Please refer to “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Once completed with the configuration, click the Save Settings button.
  11. If you are having difficulties getting any Internet game, server, or application to function properly, consider exposing one PC to the Internet using DeMilitarized Zone (DMZ) hosting. This option is available when an application requires too many ports or when you are not sure which port services to use. Make sure you disable all the forwarding entries if you want to successfully use DMZ hosting, since forwarding has priority over DMZ hosting. (In other words, data that enters the Router will be checked first by the forwarding settings. If the port number that the data enters from does not have port forwarding, then the Router will send the data to whichever PC or network device you set for DMZ hosting.) Follow these steps to set DMZ hosting: Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Disable or remove the entries you have entered for forwarding. Keep this information in case you want to use it at a later time. Click the DMZ tab. Enter the Ethernet adapter’s IP address of the computer you want exposed to the Internet. This will bypass the NAT security for that computer. Please refer to “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Once completed with the configuration, click the Save Settings button.
  12. If you want to play online games or use Internet applications, most will work without doing any port forwarding or DMZ hosting. There may be cases when you want to host an online game or Internet application. This would require you to set up the Router to deliver incoming packets or data to a specific computer. This also applies to the Internet applications you are using. The best way to get the information on what port services to use is to go to the website of the online game or application you want to use. Follow these steps to set up online game hosting or use a certain Internet application: Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Enter any name you want to use for the Application. Enter the port range of the service you are using. For example, if you have a web server, you would enter the range 80 to 80. Select the protocol you will be using, TCP or UDP, or select Both. Enter the IP address of the PC or network device that you want the port server to go to. For example, if the web server’s Ethernet adapter IP address is 192.168.1.100, you would enter 100 in the field provided. Check “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Check the Enabled option for the port services you want to use. Consider the examples below: When you have completed the configuration, click the Save Settings button.
  13. If you want to play online games or use Internet applications, most will work without doing any port forwarding or DMZ hosting. There may be cases when you want to host an online game or Internet application. This would require you to set up the Router to deliver incoming packets or data to a specific computer. This also applies to the Internet applications you are using. The best way to get the information on what port services to use is to go to the website of the online game or application you want to use. Follow these steps to set up online game hosting or use a certain Internet application: Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Enter any name you want to use for the Application. Enter the port range of the service you are using. For example, if you have a web server, you would enter the range 80 to 80. Select the protocol you will be using, TCP or UDP, or select Both. Enter the IP address of the PC or network device that you want the port server to go to. For example, if the web server’s Ethernet adapter IP address is 192.168.1.100, you would enter 100 in the field provided. Check “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Check the Enabled option for the port services you want to use. Consider the examples below: When you have completed the configuration, click the Save Settings button.
  14. To use a server like a web, ftp, or mail server, you need to know the respective port numbers they are using. For example, port 80 (HTTP) is used for web; port 21 (FTP) is used for FTP, and port 25 (SMTP outgoing) and port 110 (POP3 incoming) are used for the mail server. You can get more information by viewing the documentation provided with the server you installed. Follow these steps to set up port forwarding through the Router’s Web-based Utility. We will be setting up web, ftp, and mail servers. Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Enter any name you want to use for the Application. Enter the port range of the service you are using. For example, if you have a web server, you would enter the range 80 to 80. Select the protocol you will be using, TCP or UDP, or select Both. Enter the IP address of the PC or network device that you want the port server to go to. For example, if the web server’s Ethernet adapter IP address is 192.168.1.100, you would enter 100 in the field provided. Check “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Check the Enabled option for the port services you want to use. Consider the examples below: When you have completed the configuration, click the Save Settings button.
  15. To use a server like a web, ftp, or mail server, you need to know the respective port numbers they are using. For example, port 80 (HTTP) is used for web; port 21 (FTP) is used for FTP, and port 25 (SMTP outgoing) and port 110 (POP3 incoming) are used for the mail server. You can get more information by viewing the documentation provided with the server you installed. Follow these steps to set up port forwarding through the Router’s Web-based Utility. We will be setting up web, ftp, and mail servers. Access the Router’s Web-based Utility by going to http://192.168.1.1 or the IP address of the Router. Go to the Applications & Gaming => Port Range Forwarding tab. Enter any name you want to use for the Application. Enter the port range of the service you are using. For example, if you have a web server, you would enter the range 80 to 80. Select the protocol you will be using, TCP or UDP, or select Both. Enter the IP address of the PC or network device that you want the port server to go to. For example, if the web server’s Ethernet adapter IP address is 192.168.1.100, you would enter 100 in the field provided. Check “Appendix C: Finding the MAC Address and IP Address for Your Ethernet Adapter†for details on getting an IP address. Check the Enabled option for the port services you want to use. Consider the examples below: When you have completed the configuration, click the Save Settings button.
  16. Instead of relying on a DNS (Domain Name Server) for name to address resolution, you can use your hosts file on your local machine. Vista By default, if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don't have permission. To successfully modify the hosts file, run notepad.exe as an administrator and open the file. Browse to Start -> All Programs -> Accessories Right click "Notepad" and select "Run as administrator" Click "Continue" on the UAC prompt Click File -> Open Browse to "C:\Windows\System32\Drivers\etc" Change the file filter drop down box from "Text Documents (*.txt)" to "All Files (*.*)" Select "hosts" and click "Open" Make the needed changes and close Notepad. Save when prompted.
  17. Instead of relying on a DNS (Domain Name Server) for name to address resolution, you can use your hosts file on your local machine. Vista By default, if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don't have permission. To successfully modify the hosts file, run notepad.exe as an administrator and open the file. Browse to Start -> All Programs -> Accessories Right click "Notepad" and select "Run as administrator" Click "Continue" on the UAC prompt Click File -> Open Browse to "C:\Windows\System32\Drivers\etc" Change the file filter drop down box from "Text Documents (*.txt)" to "All Files (*.*)" Select "hosts" and click "Open" Make the needed changes and close Notepad. Save when prompted.
  18. Predefined Functions and Environment for the JavaScript Function Hostname based conditions: isPlainHostName() dnsDomainIs() localHostOrDomainIs() isResolvable() isInNet() Related utility functions: dnsResolve() myIpAddress() dnsDomainLevels() URL/hostname based conditions: shExpMatch() Time based conditions: weekdayRange() dateRange() timeRange() There is one associative array already defined (because a JavaScript currently cannot define them on its own): ProxyConfig.bindings -------------------------------------------------------------------------------- isPlainHostName(host) host the hostname from the URL (excluding port number). True iff there is no domain name in the hostname (no dots). Examples: isPlainHostName("www") is true. isPlainHostName("www.netscape.com") is false. -------------------------------------------------------------------------------- dnsDomainIs(host, domain) host is the hostname from the URL. domain is the domain name to test the hostname against. Returns true iff the domain of hostname matches. Examples: dnsDomainIs("www.netscape.com", ".netscape.com") is true. dnsDomainIs("www", ".netscape.com") is false. dnsDomainIs("www.mcom.com", ".netscape.com") is false. -------------------------------------------------------------------------------- localHostOrDomainIs(host, hostdom) host the hostname from the URL. hostdom fully qualified hostname to match against. Is true if the hostname matches exactly the specified hostname, or if there is no domain name part in the hostname, but the unqualified hostname matches. Examples: localHostOrDomainIs("www.netscape.com", "www.netscape.com") is true (exact match). localHostOrDomainIs("www", "www.netscape.com") is true (hostname match, domain not specified). localHostOrDomainIs("www.mcom.com", "www.netscape.com") is false (domain name mismatch). localHostOrDomainIs("home.netscape.com", "www.netscape.com") is false (hostname mismatch). -------------------------------------------------------------------------------- isResolvable(host) host is the hostname from the URL. Tries to resolve the hostname. Returns true if succeeds. Examples: isResolvable("www.netscape.com") is true (unless DNS fails to resolve it due to a firewall or some other reason). isResolvable("bogus.domain.foobar") is false. -------------------------------------------------------------------------------- isInNet(host, pattern, mask) host a DNS hostname, or IP address. If a hostname is passed, it will be resoved into an IP address by this function. pattern an IP address pattern in the dot-separated format mask mask for the IP address pattern informing which parts of the IP address should be matched against. 0 means ignore, 255 means match. True iff the IP address of the host matches the specified IP address pattern. Pattern and mask specification is done the same way as for SOCKS configuration. Examples: isInNet(host, "198.95.249.79", "255.255.255.255") is true iff the IP address of host matches exactly 198.95.249.79. isInNet(host, "198.95.0.0", "255.255.0.0") is true iff the IP address of the host matches 198.95.*.*. -------------------------------------------------------------------------------- dnsResolve(host) host hostname to resolve Resolves the given DNS hostname into an IP address, and returns it in the dot separated format as a string. Example: dnsResolve("home.netscape.com") returns the string "198.95.249.79". -------------------------------------------------------------------------------- myIpAddress() Returns the IP address of the host that the Navigator is running on, as a string in the dot-separated integer format. Example: myIpAddress() would return the string "198.95.249.79" if you were running the Navigator on that host. -------------------------------------------------------------------------------- dnsDomainLevels(host) host is the hostname from the URL. Returns the number (integer) of DNS domain levels (number of dots) in the hostname. Examples: dnsDomainLevels("www") returns 0. dnsDomainLevels("www.netscape.com") returns 2. -------------------------------------------------------------------------------- shExpMatch(str, shexp) str is any string to compare (e.g. the URL, or the hostname). shexp is a shell expression to compare against. Returns true if the string matches the specified shell expression. Actually, currently the patterns are shell expressions, not regular expressions. Examples: shExpMatch("http://home.netscape.com/people/ari/index.html", "*/ari/*") is true. shExpMatch("http://home.netscape.com/people/montulli/index.html", "*/ari/*") is false. -------------------------------------------------------------------------------- weekdayRange(wd1, wd2, gmt) wd1 and wd2 are one of the weekday strings: SUN MON TUE WED THU FRI SAT gmt is either the string: GMT or is left out. Only the first parameter is mandatory. Either the second, the third, or both may be left out. If only one parameter is present, the function yeilds a true value on the weekday that the parameter represents. If the string "GMT" is specified as a second parameter, times are taken to be in GMT, otherwise in local timezone. If both wd1 and wd1 are defined, the condition is true if the current weekday is in between those two weekdays. Bounds are inclusive. If the "GMT" parameter is specified, times are taken to be in GMT, otherwise the local timezone is used. Examples: weekdayRange("MON", "FRI") true Monday trhough Friday (local timezone). weekdayRange("MON", "FRI", "GMT") same as above, but GMT timezone. weekdayRange("SAT") true on Saturdays local time. weekdayRange("SAT", "GMT") true on Saturdays GMT time. weekdayRange("FRI", "MON") true Friday through Monday (note, order does matter!). -------------------------------------------------------------------------------- dateRange(day) dateRange(day1, day2) dateRange(mon) dateRange(month1, month2) dateRange(year) dateRange(year1, year2) dateRange(day1, month1, day2, month2) dateRange(month1, year1, month2, year2) dateRange(day1, month1, year1, day2, month2, year2) dateRange(day1, month1, year1, day2, month2, year2, gmt) day is the day of month between 1 and 31 (as an integer). month is one of the month strings: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC year is the full year number, for example 1995 (but not 95). Integer. gmt is either the string "GMT", which makes time comparison occur in GMT timezone; if left unspecified, times are taken to be in the local timezone. Even though the above examples don't show, the "GMT" parameter can be specified in any of the 9 different call profiles, always as the last parameter. If only a single value is specified (from each category: day, month, year), the function returns a true value only on days that match that specification. If both values are specified, the result is true between those times, including bounds. Examples: dateRange(1) true on the first day of each month, local timezone. dateRange(1, "GMT") true on the first day of each month, GMT timezone. dateRange(1, 15) true on the first half of each month. dateRange(24, "DEC") true on 24th of December each year. dateRange(24, "DEC", 1995) true on 24th of December, 1995. dateRange("JAN", "MAR") true on the first quarter of the year. dateRange(1, "JUN", 15, "AUG") true from June 1st until August 15th, each year (including June 1st and August 15th). dateRange(1, "JUN", 15, 1995, "AUG", 1995) true from June 1st, 1995, until August 15th, same year. dateRange("OCT", 1995, "MAR", 1996) true from October 1995 until March 1996 (including the entire month of October 1995 and March 1996). dateRange(1995) true during the entire year 1995. dateRange(1995, 1997) true from beginning of year 1995 until the end of year 1997. -------------------------------------------------------------------------------- timeRange(hour) timeRange(hour1, hour2) timeRange(hour1, min1, hour2, min2) timeRange(hour1, min1, sec1, hour2, min2, sec2) timeRange(hour1, min1, sec1, hour2, min2, sec2, gmt) hour is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.) min minutes from 0 to 59. sec seconds from 0 to 59. gmt either the string "GMT" for GMT timezone, or not specified, for local timezone. Again, even though the above list doesn't show it, this parameter may be present in each of the different parameter profiles, always as the last parameter. True during (or between) the specified time(s). Examples: timerange(12) true from noon to 1pm. timerange(12, 13) same as above. timerange(12, "GMT") true from noon to 1pm, in GMT timezone. timerange(9, 17) true from 9am to 5pm. timerange(8, 30, 17, 00) true from 8:30am to 5:00pm. timerange(0, 0, 0, 0, 0, 30) true between midnight and 30 seconds past midnight. -------------------------------------------------------------------------------- Example #1: Use proxy for everything except local hosts This would work in Netscape's environment. All hosts which aren't fully qualified, or the ones that are in local domain, will be connected to directly. Everything else will go through w3proxy:8080. If the proxy goes down, connections become automatically direct. function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".netscape.com")) return "DIRECT"; else return "PROXY w3proxy.netscape.com:8080; DIRECT"; } Note: This is the simplest and most efficient autoconfig file for cases where there's only one proxy. -------------------------------------------------------------------------------- Example #1b: As above, but use proxy for local servers which are outside the firewall If there are hosts (such as the main Web server) that belong to the local domain but are outside the firewall, and are only reachable through the proxy server, those exceptions can be handled using the localHostOrDomainIs() function: function FindProxyForURL(url, host) { if ((isPlainHostName(host) || dnsDomainIs(host, ".netscape.com")) && !localHostOrDomainIs(host, "www.netscape.com") && !localHostOrDoaminIs(host, "merchant.netscape.com")) return "DIRECT"; else return "PROXY w3proxy.netscape.com:8080; DIRECT"; } The above will use the proxy for everything else except local hosts in the netscape.com domain, with the further exception that hosts www.netscape.com and merchant.netscape.com will go through the proxy. Note the order of the above exceptions for efficiency: localHostOrDomainIs() functions only get executed for URLs that are in local domain, not for every URL. Be careful to note the parentheses around the or expression before the and expression to achieve the abovementioned efficient behaviour. -------------------------------------------------------------------------------- Example #2: Use proxy only if cannot resolve host This example would work in an environment where internal DNS is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts which aren't resolvable: function FindProxyForURL(url, host) { if (isResolvable(host)) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } The above requires consulting the DNS every time; it can be grouped smartly with other rules so that DNS is consulted only if other rules do not yield a result: function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com") || isResolvable(host)) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #3: Subnet based decisions In this example all the hosts in a given subnet are connected to directly, others through the proxy. function FindProxyForURL(url, host) { if (isInNet(host, "198.95.0.0", "255.255.0.0")) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } Again, use of DNS in the above can be minimized by adding redundant rules in the beginning: function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com") || isInNet(host, "198.95.0.0", "255.255.0.0")) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #4: Load balancing/routing based on URL patterns This example is more sophisticated. There are four (4) proxy servers; one of them is a hot stand-by for all of the other ones, so if any of the remaining three goes down, the fourth one will take over. Furthermore, the three remaining proxy servers share the load based on URL patterns, which makes their caching more effective (there is only one copy of any document on the three servers -- as opposed to one copy on each of them). The load is distributed like this: Proxy Purpose #1 .com domain #2 .edu domain #3 all other domains #4 hot stand-by All local accesses are desired to be direct. All proxy servers run on the port 8080 (they wouldn't need to). Note how strings can be concatenated by the + operator in JavaScript. function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com")) return "DIRECT"; else if (shExpMatch(host, "*.com")) return "PROXY proxy1.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; else if (shExpMatch(host, "*.edu")) return "PROXY proxy2.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; else return "PROXY proxy3.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #5: Setting a proxy for a specific protocol Most of the standard JavaScript functionality is available for use in the FindProxyForURL() function. As an example, to set different proxies based on the protocol, the substring() function can be used: function FindProxyForURL(url, host) { if (url.substring(0, 5) == "http:") { return "PROXY http-proxy.mydomain.com:8080"; } else if (url.substring(0, 4) == "ftp:") { return "PROXY ftp-proxy.mydomain.com:8080"; } else if (url.substring(0, 7) == "gopher:") { return "PROXY gopher-proxy.mydomain.com:8080"; } else if (url.substring(0, 6) == "https:" || url.substring(0, 6) == "snews:") { return "PROXY security-proxy.mydomain.com:8080"; } else { return "DIRECT"; } } Note: The same can be accomplished using the shExpMatch() function described earlier; for example: ... if (shExpMatch(url, "http:*")) { return "PROXY http-proxy.mydomain.com:8080; } ...
  19. Predefined Functions and Environment for the JavaScript Function Hostname based conditions: isPlainHostName() dnsDomainIs() localHostOrDomainIs() isResolvable() isInNet() Related utility functions: dnsResolve() myIpAddress() dnsDomainLevels() URL/hostname based conditions: shExpMatch() Time based conditions: weekdayRange() dateRange() timeRange() There is one associative array already defined (because a JavaScript currently cannot define them on its own): ProxyConfig.bindings -------------------------------------------------------------------------------- isPlainHostName(host) host the hostname from the URL (excluding port number). True iff there is no domain name in the hostname (no dots). Examples: isPlainHostName("www") is true. isPlainHostName("www.netscape.com") is false. -------------------------------------------------------------------------------- dnsDomainIs(host, domain) host is the hostname from the URL. domain is the domain name to test the hostname against. Returns true iff the domain of hostname matches. Examples: dnsDomainIs("www.netscape.com", ".netscape.com") is true. dnsDomainIs("www", ".netscape.com") is false. dnsDomainIs("www.mcom.com", ".netscape.com") is false. -------------------------------------------------------------------------------- localHostOrDomainIs(host, hostdom) host the hostname from the URL. hostdom fully qualified hostname to match against. Is true if the hostname matches exactly the specified hostname, or if there is no domain name part in the hostname, but the unqualified hostname matches. Examples: localHostOrDomainIs("www.netscape.com", "www.netscape.com") is true (exact match). localHostOrDomainIs("www", "www.netscape.com") is true (hostname match, domain not specified). localHostOrDomainIs("www.mcom.com", "www.netscape.com") is false (domain name mismatch). localHostOrDomainIs("home.netscape.com", "www.netscape.com") is false (hostname mismatch). -------------------------------------------------------------------------------- isResolvable(host) host is the hostname from the URL. Tries to resolve the hostname. Returns true if succeeds. Examples: isResolvable("www.netscape.com") is true (unless DNS fails to resolve it due to a firewall or some other reason). isResolvable("bogus.domain.foobar") is false. -------------------------------------------------------------------------------- isInNet(host, pattern, mask) host a DNS hostname, or IP address. If a hostname is passed, it will be resoved into an IP address by this function. pattern an IP address pattern in the dot-separated format mask mask for the IP address pattern informing which parts of the IP address should be matched against. 0 means ignore, 255 means match. True iff the IP address of the host matches the specified IP address pattern. Pattern and mask specification is done the same way as for SOCKS configuration. Examples: isInNet(host, "198.95.249.79", "255.255.255.255") is true iff the IP address of host matches exactly 198.95.249.79. isInNet(host, "198.95.0.0", "255.255.0.0") is true iff the IP address of the host matches 198.95.*.*. -------------------------------------------------------------------------------- dnsResolve(host) host hostname to resolve Resolves the given DNS hostname into an IP address, and returns it in the dot separated format as a string. Example: dnsResolve("home.netscape.com") returns the string "198.95.249.79". -------------------------------------------------------------------------------- myIpAddress() Returns the IP address of the host that the Navigator is running on, as a string in the dot-separated integer format. Example: myIpAddress() would return the string "198.95.249.79" if you were running the Navigator on that host. -------------------------------------------------------------------------------- dnsDomainLevels(host) host is the hostname from the URL. Returns the number (integer) of DNS domain levels (number of dots) in the hostname. Examples: dnsDomainLevels("www") returns 0. dnsDomainLevels("www.netscape.com") returns 2. -------------------------------------------------------------------------------- shExpMatch(str, shexp) str is any string to compare (e.g. the URL, or the hostname). shexp is a shell expression to compare against. Returns true if the string matches the specified shell expression. Actually, currently the patterns are shell expressions, not regular expressions. Examples: shExpMatch("http://home.netscape.com/people/ari/index.html", "*/ari/*") is true. shExpMatch("http://home.netscape.com/people/montulli/index.html", "*/ari/*") is false. -------------------------------------------------------------------------------- weekdayRange(wd1, wd2, gmt) wd1 and wd2 are one of the weekday strings: SUN MON TUE WED THU FRI SAT gmt is either the string: GMT or is left out. Only the first parameter is mandatory. Either the second, the third, or both may be left out. If only one parameter is present, the function yeilds a true value on the weekday that the parameter represents. If the string "GMT" is specified as a second parameter, times are taken to be in GMT, otherwise in local timezone. If both wd1 and wd1 are defined, the condition is true if the current weekday is in between those two weekdays. Bounds are inclusive. If the "GMT" parameter is specified, times are taken to be in GMT, otherwise the local timezone is used. Examples: weekdayRange("MON", "FRI") true Monday trhough Friday (local timezone). weekdayRange("MON", "FRI", "GMT") same as above, but GMT timezone. weekdayRange("SAT") true on Saturdays local time. weekdayRange("SAT", "GMT") true on Saturdays GMT time. weekdayRange("FRI", "MON") true Friday through Monday (note, order does matter!). -------------------------------------------------------------------------------- dateRange(day) dateRange(day1, day2) dateRange(mon) dateRange(month1, month2) dateRange(year) dateRange(year1, year2) dateRange(day1, month1, day2, month2) dateRange(month1, year1, month2, year2) dateRange(day1, month1, year1, day2, month2, year2) dateRange(day1, month1, year1, day2, month2, year2, gmt) day is the day of month between 1 and 31 (as an integer). month is one of the month strings: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC year is the full year number, for example 1995 (but not 95). Integer. gmt is either the string "GMT", which makes time comparison occur in GMT timezone; if left unspecified, times are taken to be in the local timezone. Even though the above examples don't show, the "GMT" parameter can be specified in any of the 9 different call profiles, always as the last parameter. If only a single value is specified (from each category: day, month, year), the function returns a true value only on days that match that specification. If both values are specified, the result is true between those times, including bounds. Examples: dateRange(1) true on the first day of each month, local timezone. dateRange(1, "GMT") true on the first day of each month, GMT timezone. dateRange(1, 15) true on the first half of each month. dateRange(24, "DEC") true on 24th of December each year. dateRange(24, "DEC", 1995) true on 24th of December, 1995. dateRange("JAN", "MAR") true on the first quarter of the year. dateRange(1, "JUN", 15, "AUG") true from June 1st until August 15th, each year (including June 1st and August 15th). dateRange(1, "JUN", 15, 1995, "AUG", 1995) true from June 1st, 1995, until August 15th, same year. dateRange("OCT", 1995, "MAR", 1996) true from October 1995 until March 1996 (including the entire month of October 1995 and March 1996). dateRange(1995) true during the entire year 1995. dateRange(1995, 1997) true from beginning of year 1995 until the end of year 1997. -------------------------------------------------------------------------------- timeRange(hour) timeRange(hour1, hour2) timeRange(hour1, min1, hour2, min2) timeRange(hour1, min1, sec1, hour2, min2, sec2) timeRange(hour1, min1, sec1, hour2, min2, sec2, gmt) hour is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.) min minutes from 0 to 59. sec seconds from 0 to 59. gmt either the string "GMT" for GMT timezone, or not specified, for local timezone. Again, even though the above list doesn't show it, this parameter may be present in each of the different parameter profiles, always as the last parameter. True during (or between) the specified time(s). Examples: timerange(12) true from noon to 1pm. timerange(12, 13) same as above. timerange(12, "GMT") true from noon to 1pm, in GMT timezone. timerange(9, 17) true from 9am to 5pm. timerange(8, 30, 17, 00) true from 8:30am to 5:00pm. timerange(0, 0, 0, 0, 0, 30) true between midnight and 30 seconds past midnight. -------------------------------------------------------------------------------- Example #1: Use proxy for everything except local hosts This would work in Netscape's environment. All hosts which aren't fully qualified, or the ones that are in local domain, will be connected to directly. Everything else will go through w3proxy:8080. If the proxy goes down, connections become automatically direct. function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".netscape.com")) return "DIRECT"; else return "PROXY w3proxy.netscape.com:8080; DIRECT"; } Note: This is the simplest and most efficient autoconfig file for cases where there's only one proxy. -------------------------------------------------------------------------------- Example #1b: As above, but use proxy for local servers which are outside the firewall If there are hosts (such as the main Web server) that belong to the local domain but are outside the firewall, and are only reachable through the proxy server, those exceptions can be handled using the localHostOrDomainIs() function: function FindProxyForURL(url, host) { if ((isPlainHostName(host) || dnsDomainIs(host, ".netscape.com")) && !localHostOrDomainIs(host, "www.netscape.com") && !localHostOrDoaminIs(host, "merchant.netscape.com")) return "DIRECT"; else return "PROXY w3proxy.netscape.com:8080; DIRECT"; } The above will use the proxy for everything else except local hosts in the netscape.com domain, with the further exception that hosts www.netscape.com and merchant.netscape.com will go through the proxy. Note the order of the above exceptions for efficiency: localHostOrDomainIs() functions only get executed for URLs that are in local domain, not for every URL. Be careful to note the parentheses around the or expression before the and expression to achieve the abovementioned efficient behaviour. -------------------------------------------------------------------------------- Example #2: Use proxy only if cannot resolve host This example would work in an environment where internal DNS is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts which aren't resolvable: function FindProxyForURL(url, host) { if (isResolvable(host)) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } The above requires consulting the DNS every time; it can be grouped smartly with other rules so that DNS is consulted only if other rules do not yield a result: function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com") || isResolvable(host)) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #3: Subnet based decisions In this example all the hosts in a given subnet are connected to directly, others through the proxy. function FindProxyForURL(url, host) { if (isInNet(host, "198.95.0.0", "255.255.0.0")) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } Again, use of DNS in the above can be minimized by adding redundant rules in the beginning: function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com") || isInNet(host, "198.95.0.0", "255.255.0.0")) return "DIRECT"; else return "PROXY proxy.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #4: Load balancing/routing based on URL patterns This example is more sophisticated. There are four (4) proxy servers; one of them is a hot stand-by for all of the other ones, so if any of the remaining three goes down, the fourth one will take over. Furthermore, the three remaining proxy servers share the load based on URL patterns, which makes their caching more effective (there is only one copy of any document on the three servers -- as opposed to one copy on each of them). The load is distributed like this: Proxy Purpose #1 .com domain #2 .edu domain #3 all other domains #4 hot stand-by All local accesses are desired to be direct. All proxy servers run on the port 8080 (they wouldn't need to). Note how strings can be concatenated by the + operator in JavaScript. function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com")) return "DIRECT"; else if (shExpMatch(host, "*.com")) return "PROXY proxy1.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; else if (shExpMatch(host, "*.edu")) return "PROXY proxy2.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; else return "PROXY proxy3.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; } -------------------------------------------------------------------------------- Example #5: Setting a proxy for a specific protocol Most of the standard JavaScript functionality is available for use in the FindProxyForURL() function. As an example, to set different proxies based on the protocol, the substring() function can be used: function FindProxyForURL(url, host) { if (url.substring(0, 5) == "http:") { return "PROXY http-proxy.mydomain.com:8080"; } else if (url.substring(0, 4) == "ftp:") { return "PROXY ftp-proxy.mydomain.com:8080"; } else if (url.substring(0, 7) == "gopher:") { return "PROXY gopher-proxy.mydomain.com:8080"; } else if (url.substring(0, 6) == "https:" || url.substring(0, 6) == "snews:") { return "PROXY security-proxy.mydomain.com:8080"; } else { return "DIRECT"; } } Note: The same can be accomplished using the shExpMatch() function described earlier; for example: ... if (shExpMatch(url, "http:*")) { return "PROXY http-proxy.mydomain.com:8080; } ...
  20. Below is a sample proxy.pac file // ******************************************************************** // template.txt: Version 3.1 // slight edits for clarity // // Proxy Auto-Config (PAC) template file for web browser and roaming // users. Follow the instruction through this configuration file to // update for your specific environment. // // Notes: // - "host" refers to the host portion of the URL being requested (i.e. // everything after the :// at the beginning of the URL up to the // first colon ( or slash (/) (e.g. www.example.com). // - "url" refers to the entire URL being requested. This includes // the protocol and file (e.g. http://www.example.com/index.html). // - Microsoft IE processes the PAC file once per hostname and caches // the result. You cannot have different behaviour for the same // hostname (e.g. http://www.example.com/index.html must be // directed to the same proxy as http://www.example.com/foo.html). // - isInNet will perform a DNS lookup for non IP addresses. Ensure the // host is a raw IP before using this function. // - For debugging, set the debug variable to true. // ******************************************************************** function FindProxyForURL(url, host) { var debug = true; var direct = "DIRECT"; // Proxy addresses by region. var proxy1_eu = "PROXY proxy1.eu.webscanningservice.com:3128"; var proxy1_us = "PROXY proxy1.us.webscanningservice.com:3128"; var proxy2_us = "PROXY proxy2.us.webscanningservice.com:3128"; var proxy1_ap = "PROXY proxy1.ap.webscanningservice.com:3128"; var proxy1_hk = "PROXY proxy1.hk.webscanningservice.com:3128"; // ***************************************************************** // Proxy address for roaming users, specify the appropriate region // ***************************************************************** var roaming1_eu = "PROXY roaming1.eu.webscanningservice.com:80"; var roaming1_us = "PROXY roaming1.us.webscanningservice.com:80"; var roaming2_us = "PROXY roaming2.us.webscanningservice.com:80"; var roaming1_ap = "PROXY roaming1.ap.webscanningservice.com:80"; var roaming = roaming1_eu; // ***************************************************************** // Specify your CSP address if applicable, one line for each // distinct company subnet. // ***************************************************************** var site1 = "PROXY 192.168.2.10:3128"; var site3 = "PROXY 192.168.105.20:3128"; var site2 = "PROXY 192.168.1.3:8080"; // Source IP address. var myIp = myIpAddress(); var anet = "255.0.0.0" var bnet = "255.255.0.0" var cnet = "255.255.255.0" // If the host is this computer, connect directly if ((host == "localhost") || (host == "localhost.localdomain") || (host == "127.0.0.1")) { if (debug) alert("PAC: DIRECT: localhost: " + host); return direct; } // If host name is local (i.e. contains no dots), connect directly. if (isPlainHostName(host)) { if (debug) alert("PAC: DIRECT: plain host: " + host); return direct; } // If host name is part of the IANA private IP address ranges, connect // directly. if (/^\d+\.\d+\.\d+\.\d+$/.test(host) && (isInNet(host, "10.0.0.0", anet) || isInNet(host, "169.0.0.0", anet) || isInNet(host, "172.16.0.0", "255.240.0.0") || isInNet(host, "192.168.0.0", bnet))) { if (debug) alert("PAC: DIRECT: IANA private network: " + host); return direct; } // ***************************************************************** // Specify remote URLs that are trusted and don't require proxying // and should be bypassed when roaming. // ***************************************************************** if (shExpMatch(host, "*.download.microsoft.com") || shExpMatch(host, "*.windowsupdate.com") || shExpMatch(host, "*.windowsupdate.microsoft.com") || shExpMatch(host, "windowsupdate.microsoft.com") || shExpMatch(host, "*.update.microsoft.com") || shExpMatch(host, "update.microsoft.com")) { if (debug) alert("PAC: BYPASS: Windows Update: " + host); roaming = direct; } // ***************************************************************** // Specify VPN ranges, one line for each VPN range. // When using a VPN, proxying is done through roaming proxy. // ***************************************************************** // if (isInNet(myIp, "", "" )) { if(debug) alert("PAC: ROAMING: VPN1: " + host); return roaming; } // if (isInNet(myIp, "", "" )) { if(debug) alert("PAC: ROAMING: VPN1: " + host); return roaming; } // ***************************************************************** // Specify local FQDNs which do not require proxying, one line per // expression. Shell expression patterns can be used. // ***************************************************************** // if (shExpMatch(host, "")) { if(debug) alert("PAC: ROAMING: Local FQDN 1: " + host); return direct; } // if (shExpMatch(host, "")) { if(debug) alert("PAC: ROAMING: Local FQDN 1: " + host); return direct; } // ***************************************************************** // Specify company subnet source IP address ranges which require // proxying, one line per expression. Specify adequate proxy region // or CSP address for each range. // ***************************************************************** // if (isInNet(myIp, "", "")) { if(debug) alert("PAC: ROAMING: Subnet 1: " + host); return ; } if (isInNet(myIp,"192.168.2.0", cnet)) {if(debug) alert("PAC: proxy site 1: " + host); return site1; } if (isInNet(myIp,"192.168.112.0", cnet)) {if(debug) alert("PAC: site without local proxy: " + host); return roaming;} if (isInNet(myIp,"192.168.104.0", cnet)) {if(debug) alert("PAC: proxy site2: " + host); return site2; } if (isInNet(myIp,"192.168.105.0", cnet)) {if(debug) alert("PAC: proxy site3: " + host); return site3; } // When outside company subnet, connect to roaming proxy. if (debug && roaming != direct) alert("PAC: ROAMING: Default: " + host); return roaming; } proxypacfiletest.txt
  21. Below is a sample proxy.pac file // ******************************************************************** // template.txt: Version 3.1 // slight edits for clarity // // Proxy Auto-Config (PAC) template file for web browser and roaming // users. Follow the instruction through this configuration file to // update for your specific environment. // // Notes: // - "host" refers to the host portion of the URL being requested (i.e. // everything after the :// at the beginning of the URL up to the // first colon ( or slash (/) (e.g. www.example.com). // - "url" refers to the entire URL being requested. This includes // the protocol and file (e.g. http://www.example.com/index.html). // - Microsoft IE processes the PAC file once per hostname and caches // the result. You cannot have different behaviour for the same // hostname (e.g. http://www.example.com/index.html must be // directed to the same proxy as http://www.example.com/foo.html). // - isInNet will perform a DNS lookup for non IP addresses. Ensure the // host is a raw IP before using this function. // - For debugging, set the debug variable to true. // ******************************************************************** function FindProxyForURL(url, host) { var debug = true; var direct = "DIRECT"; // Proxy addresses by region. var proxy1_eu = "PROXY proxy1.eu.webscanningservice.com:3128"; var proxy1_us = "PROXY proxy1.us.webscanningservice.com:3128"; var proxy2_us = "PROXY proxy2.us.webscanningservice.com:3128"; var proxy1_ap = "PROXY proxy1.ap.webscanningservice.com:3128"; var proxy1_hk = "PROXY proxy1.hk.webscanningservice.com:3128"; // ***************************************************************** // Proxy address for roaming users, specify the appropriate region // ***************************************************************** var roaming1_eu = "PROXY roaming1.eu.webscanningservice.com:80"; var roaming1_us = "PROXY roaming1.us.webscanningservice.com:80"; var roaming2_us = "PROXY roaming2.us.webscanningservice.com:80"; var roaming1_ap = "PROXY roaming1.ap.webscanningservice.com:80"; var roaming = roaming1_eu; // ***************************************************************** // Specify your CSP address if applicable, one line for each // distinct company subnet. // ***************************************************************** var site1 = "PROXY 192.168.2.10:3128"; var site3 = "PROXY 192.168.105.20:3128"; var site2 = "PROXY 192.168.1.3:8080"; // Source IP address. var myIp = myIpAddress(); var anet = "255.0.0.0" var bnet = "255.255.0.0" var cnet = "255.255.255.0" // If the host is this computer, connect directly if ((host == "localhost") || (host == "localhost.localdomain") || (host == "127.0.0.1")) { if (debug) alert("PAC: DIRECT: localhost: " + host); return direct; } // If host name is local (i.e. contains no dots), connect directly. if (isPlainHostName(host)) { if (debug) alert("PAC: DIRECT: plain host: " + host); return direct; } // If host name is part of the IANA private IP address ranges, connect // directly. if (/^\d+\.\d+\.\d+\.\d+$/.test(host) && (isInNet(host, "10.0.0.0", anet) || isInNet(host, "169.0.0.0", anet) || isInNet(host, "172.16.0.0", "255.240.0.0") || isInNet(host, "192.168.0.0", bnet))) { if (debug) alert("PAC: DIRECT: IANA private network: " + host); return direct; } // ***************************************************************** // Specify remote URLs that are trusted and don't require proxying // and should be bypassed when roaming. // ***************************************************************** if (shExpMatch(host, "*.download.microsoft.com") || shExpMatch(host, "*.windowsupdate.com") || shExpMatch(host, "*.windowsupdate.microsoft.com") || shExpMatch(host, "windowsupdate.microsoft.com") || shExpMatch(host, "*.update.microsoft.com") || shExpMatch(host, "update.microsoft.com")) { if (debug) alert("PAC: BYPASS: Windows Update: " + host); roaming = direct; } // ***************************************************************** // Specify VPN ranges, one line for each VPN range. // When using a VPN, proxying is done through roaming proxy. // ***************************************************************** // if (isInNet(myIp, "", "" )) { if(debug) alert("PAC: ROAMING: VPN1: " + host); return roaming; } // if (isInNet(myIp, "", "" )) { if(debug) alert("PAC: ROAMING: VPN1: " + host); return roaming; } // ***************************************************************** // Specify local FQDNs which do not require proxying, one line per // expression. Shell expression patterns can be used. // ***************************************************************** // if (shExpMatch(host, "")) { if(debug) alert("PAC: ROAMING: Local FQDN 1: " + host); return direct; } // if (shExpMatch(host, "")) { if(debug) alert("PAC: ROAMING: Local FQDN 1: " + host); return direct; } // ***************************************************************** // Specify company subnet source IP address ranges which require // proxying, one line per expression. Specify adequate proxy region // or CSP address for each range. // ***************************************************************** // if (isInNet(myIp, "", "")) { if(debug) alert("PAC: ROAMING: Subnet 1: " + host); return ; } if (isInNet(myIp,"192.168.2.0", cnet)) {if(debug) alert("PAC: proxy site 1: " + host); return site1; } if (isInNet(myIp,"192.168.112.0", cnet)) {if(debug) alert("PAC: site without local proxy: " + host); return roaming;} if (isInNet(myIp,"192.168.104.0", cnet)) {if(debug) alert("PAC: proxy site2: " + host); return site2; } if (isInNet(myIp,"192.168.105.0", cnet)) {if(debug) alert("PAC: proxy site3: " + host); return site3; } // When outside company subnet, connect to roaming proxy. if (debug && roaming != direct) alert("PAC: ROAMING: Default: " + host); return roaming; } proxypacfiletest.txt
  22. The pac file itself have a few predefined functions and variables exposed, here are the most useful ones: host – host being connected to. url – address to be retrieved. myIpAddress() – returns the IP address (in integer-dot format) of the network adapter that have the highest priority on the host, that the browser is running on. isInNet(host, network, subnet) – determines if the given host resides on the specified network. dnsDomainIs(host, dns-suffix) – attempts to decide if host belongs to domain. isPlainHostName(host) - returns true if host doesn’t contain any dots.
  23. The pac file itself have a few predefined functions and variables exposed, here are the most useful ones: host – host being connected to. url – address to be retrieved. myIpAddress() – returns the IP address (in integer-dot format) of the network adapter that have the highest priority on the host, that the browser is running on. isInNet(host, network, subnet) – determines if the given host resides on the specified network. dnsDomainIs(host, dns-suffix) – attempts to decide if host belongs to domain. isPlainHostName(host) - returns true if host doesn’t contain any dots.
  24. Debugging a pac file http://support.microsoft.com/kb/274356 Or JSLint. http://www.jslint.com/
  25. Debugging a pac file http://support.microsoft.com/kb/274356 Or JSLint. http://www.jslint.com/

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.