MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Software",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "4": {
                "pageid": 4,
                "ns": 0,
                "title": "Replacing The Playstation 2 (slim)'s Laser",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "My PS2 Two (slim, SCPH-70011) stopped working while playing socom 2 for a good amount of time, so I called Sony and since it was out of warranty (90 days, wtf kind of warranty is that?) they wanted to charge me $95 to get it fixed plus shipping. That's just about the price of a new PS2!! So, I figured I'd fix it myself, only the laser needed to be replaced ^_^. I found the part I needed on ebay. In fact, not only did I order the laser, I ordered the whole freaking laser assembly for $55!!! So lets begin... (For all you out there that might not be sure if your laser is truly dead click [[#Final_Precautions|here]] to see how you can clean the laser.)\n\n== Tools ==\n\nYou don't need any special tools to open up a playstation, in fact you could do it all with a #1 philip's head screwdriver. If you want to be fancy, get an assortment of small eyeglass repair screwdrivers, but you probably won't need them.\n[[Image:PS2_laser_01-tools.jpg|center|thumb|250px]]\n\n== Taking The Cover Off ==\n\n* Start off by removing the little rubber and plastic feet from the bottom to expose the 6 screws:\n[[Image:PS2_laser_02-pads.jpg|center|thumb|350px]]\n[[Image:PS2_laser_03-pads-off.jpg|center|thumb|350px]]\n* Pull apart the bottom of the ps2 (the side with the little hole for the vertical stand):\n[[Image:PS2_laser_04-bottom-open.jpg|center|thumb|350px]]\n*Be Careful! Start pulling apart the two halves where the power switch is. If you can see the little white push-button-power switch (tact-switch if you're fancy, btw it's in the picture. It's a little blurry.) then you can just pull hard and it will come apart. If You break off the switch don't worry it's easy to solder back on, go [[#Soldering_The_Power_Switch_Back_On|here]] for instructions.\n[[Image:PS2_laser_05-front-open.jpg|center|thumb|350px]]\n[[Image:PS2_laser_06-open-apart.jpg|center|thumb|250px]]\n\n== Taking Out The Laser Assembly ==\n\n*I truly hope you can find it :P , if not here it is:\n[[Image:PS2_laser_07-laser-closeup.jpg|center|thumb|250px]]\n*Locate the two motors' ribbon cables (one's white, the other's small and on the right) and unplug them. Don't unplug the middle ribbon cable because there's no need to, you'll end up having to re-align it later so just leave it.\n[[Image:PS2_laser_08-cables.jpg|center|thumb|350px]]\n[[Image:PS2_laser_09-stepper-cable.jpg|center|thumb|350px]]\n[[Image:PS2_laser_10-motor.jpg|center|thumb|350px]]\n[[Image:PS2_laser_11-motor-cable.jpg|center|thumb|350px]]\n*Now unscrew the 4 big screws holding the laser assembly down:\n[[Image:PS2_laser_12-screws.jpg|center|thumb|350px]]\n[[Image:PS2_laser_13-unscrewed.jpg|center|thumb|250px]]\n*Lift the assembly from the side facing you (see the pictures..) and fold it back to expose the laser's ribbon cable. It's easier if you move the laser back away from the motor so when you flip it backwards there isn't too much tension on the cable.\n[[Image:PS2_laser_14-laser-free.jpg|center|thumb|350px]]\n[[Image:PS2_laser_15-laser-upsidedown.jpg|center|thumb|350px]]\n*Now gently pull out the cable with your finger(s) and finally remove the assembly:\n[[Image:PS2_laser_16-pull-cable.jpg|center|thumb|350px]]\n[[Image:PS2_laser_17-cable-alone.jpg|center|thumb|350px]]\n[[Image:PS2_laser_18-laser-desk.jpg|center|thumb|250px]]\n\n== Removing The Actual Laser ==\n\n*If you bought the whole assembly like me you don't need this but if you only bought the laser this is how to change it out. (click [[#Installing_The_New_Laser_Assembly|here]] to skip this)\n*Remove the two screws that hold the metal bar in place. Be careful those screws are really tiny! Then just slide off the old laser off and slide the new one on. If you want apply a bit (I mean a *bit*, not much) of white lithium grease to the metal bar and the track across from it.\n[[Image:PS2_laser_19-bar-screw-1.jpg|center|thumb|350px]]\n[[Image:PS2_laser_20-bar-screw-2.jpg|center|thumb|350px]]\n[[Image:PS2_laser_21-laser-with-bar.jpg|center|thumb|350px]]\n[[Image:PS2_laser_22-laser-alone.jpg|center|thumb|350px]]\n*If you bought a brand new laser you may (I'm not sure, I heard this somewhere) have to desolder 3 pads that are joined together on the side of the laser. I'm talking about the ones on the left side of the picture. (It's blurry, I know, sue me!) If they are joined together by a blob of solder, desolder it before you install it. And most importantly, Don't Touch the bloody LENS!\n[[Image:PS2_laser_23-solder-pads.jpg|center|thumb|350px]]\n*When it's installed, make sure it slides well by rubbing the worm gear with your finger, if it moves easily you've done a good job.\n[[Image:PS2_laser_24-worm-gear.jpg|center|thumb|350px]]\n\n== Installing The New Laser Assembly ==\n\n*Move the laser all the way back and get something soft to rest the laser assembly on. I used toilet paper, 3 ply to be safe ;). Put the toilet paper on the edge of your playstation and rest the laser assembly on it. Re-attach the ribbon cable and flip it back over.\n[[Image:PS2_laser_25-laser-new.jpg|center|thumb|350px]]\n[[Image:PS2_laser_26-laser-on-tp.jpg|center|thumb|350px]]\n[[Image:PS2_laser_27-laser-connected.jpg|center|thumb|350px]]\n[[Image:PS2_laser_28-laser-back-in.jpg|center|thumb|350px]]\n*Attach the two motor's ribbon cables back. Then slide the laser up and down it's track to make sure it doesn't get caught on anything.\n[[Image:PS2_laser_29-laser-connected.jpg|center|thumb|350px]]\n*Put back the 4 screws and don't over tighten them, make sure that they're in all the way though..\n[[Image:PS2_laser_30-screwed-in.jpg|center|thumb|350px]]\n\n== Putting The PS2 Back Together ==\n\n*This one's a bit trickier to get back together than the old one's but it's still easy. Put the top part of the case over the bottom right corner first (over the power switch):\n[[Image:PS2_laser_31-close-front.jpg|center|thumb|350px]]\n*Then do the bottom left, and the back.\n[[Image:PS2_laser_32-close-back.jpg|center|thumb|350px]]\n*Flip it over and push down on the little lip till you hear a click, and you're done!\n[[Image:PS2_laser_33-close-bottom.jpg|center|thumb|350px]]\n*Lastly put the screws in and the little feet.\n[[Image:PS2_laser_34-screws-in.jpg|center|thumb|350px]]\n\n== Final Precautions ==\n\n*Now that your done you might want to clean the laser's lens in-case you touched it. Use regular rubbing alcohol and a cotton swab. Rub back and forth and make sure the cotton swab doesn't leave any fibers left behind on the lens.\n[[Image:PS2_laser_35-alcohol.jpg|center|thumb|250px]]\n[[Image:PS2_laser_36-rub.jpg|center|thumb|350px]]\n\n== Soldering The Power Switch Back On ==\n\n*If you're like me, you ripped your console open too fast and you broke the power switch off the little pcb. No worries it can still be soldered back on.\n*Using a medium heat soldering iron tin the pads on the pcb and then put the switch on top of the the 4 pads. Go around the switch melting the solder on each pad and pressing down on the switch till all 4 are soldered.\n[[Image:PS2_laser_37-solder.jpg|center|thumb|350px]]\n*Test It...\n[[Image:PS2_laser_38-red-light.jpg|center|thumb|350px]]\n[[Image:PS2_laser_39-green-light.jpg|center|thumb|350px]]\n*A problem I had was that I couldn't get the switch flat onto the pcb so when I put it back together the switch wouldn't work. To fix that I cut out the little notch on the inside of the top half of the console. In the first picture I'm pointing at the notch (right behind the power button) and in the second I'm cutting it off with a razor blade (the rustier, the better!).\n[[Image:PS2_laser_40-notch.jpg|center|thumb|350px]]\n[[Image:PS2_laser_41-cut-notch.jpg|center|thumb|350px]]\n*Now the cover should fit like a glove and the switch should feel like it was brand new!\n[[Image:PS2_laser_42-test-button.jpg|center|thumb|350px]]\n\n== Tips == \n\n*If you want to have better access to the laser when cleaning/servicing it then plug in the PS2, press the power button (with the lid closed). Wait 3 seconds then unplug it, when you open the lid the laser will as close as it can be towards you.\n\n*If you have the playstation apart and you wish to test the motors and make sure that the laser doesn't get caught on anything when its moving there are 2 switches you must hold down to fool the playstation into thinking that the lid is closed. The most obvious is the one above the power switch and then other is in the back near one of the laser assembly's screws:\n[[Image:PS2_laser_43-front-button.jpg|center|thumb|350px]]\n[[Image:PS2_laser_44-back-button.jpg|center|thumb|350px]]\n\n== Last Words ==\n\nDon't let Sony take your money when you can do it yourself, they are just making money off your ignorance, the whole repair industry is based on that idea. If you try you might have fun or learn a thing or two (and save money).\n\nBest of luck,\n\n-->nikosapi\n\n\n[[Image:PS2_laser_45-last.jpg|center|thumb|350px|WOOT! It works!]]"
                    }
                ]
            },
            "160": {
                "pageid": 160,
                "ns": 0,
                "title": "Route Squid Proxy Traffic Through an OpenVPN Gateway",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "==Problem Description==\n\nWhen using a VPN, the default configuration is to route all traffic over the VPN tunnel. However, there are some instances where it is useful to only route application-specific traffic instead of forcing all traffic through the VPN. This isn't always possible, but if application in question supports an HTTP proxy then we can use Squid to transparently pass that traffic off to an OpenVPN gateway.\n\n==Implementation Details==\n\n===iproute2 Configuration===\nPermanently add a custom routing table for OpenVPN traffic:\n echo \"100 openvpn\" >> /etc/iproute2/rt_tables\n\nThe addition/deletion of the actual routes will be added by the OpenVPN up/down scripts.\n\n===Squid Configuration===\nTraffic which is accepted by Squid must be emitted on the OpenVPN tunnel interface in order for this to work. Since IP address for the interface is dynamic (assuming the server is not configured to provide static IP addresses) this would require updating the Squid config file every time the VPN connection is established (AFAIK, a hostname cannot be provided in place of the IP address). To get around this limitation, we will emit traffic on a random IP address and then use iptables to forward traffic to the real IP address.\n\nThe following lines were added to the ''/etc/squid3/squid.conf'' config file:\n acl local_net src 192.168.0.0/255.255.255.0\n http_access allow local_net\n forwarded_for delete\n tcp_outgoing_address 10.202.101.1\n\nThe first line defines my local network, the second line instructs Squid to accept connections from any computer on my local network, and the third line prevents Squid from including the X-Forwarded-For header in its outgoing connections. The last line defines the source IP address for which Squid will use to make requests on behalf of users. Note that this IP address should not belong to your local subnet or the OpenVPN subnet.\n\n===OpenVPN Client Configuration===\nAdd the following items to the client config file:\n route-noexec\n route-up route-up.sh\n down down.sh\n\nThe ''route-noexec'' parameter prevents the client from applying the default routing configuration which is pushed from the server. The ''route-up'' parameter must point to a script which will be used to setup the custom routing and the ''down'' parameter must point to a script that will remove the custom routing once the VPN client is stopped.\n\nThe content of ''route-up.sh'' should look like this:\n #!/bin/bash\n \n source \"`dirname $0`/vpn_config.sh\" \n \n logger \"OpenVPN route-up.sh: bridge if: $VPNBRIDGE_IF addr: $VPNBRIDGE_ADDR table: $VPNBRIDGE_TBL\"\n \n # Add the default route to our custom 'openvpn' routing table\n ip route add default via $ifconfig_remote dev $dev table $VPNBRIDGE_TBL\n \n # Add new interface to act as a middleman between the fixed address used \n # by Squid and the dynamic address provided by OpenVPN\n ip tuntap add dev $VPNBRIDGE_IF mode tun\n ip addr add $VPNBRIDGE_ADDR dev $VPNBRIDGE_IF\n ip link set dev $VPNBRIDGE_IF up\n \n # All packets from Squid are passed to the custom routing table\n ip rule add from $VPNBRIDGE_ADDR lookup $VPNBRIDGE_TBL\n \n # Rewrite the source address to match the one provided by OpenVPN\n iptables -t nat -A POSTROUTING -s $VPNBRIDGE_ADDR -j SNAT --to-source $ifconfig_local\n \n logger \"OpenVPN route-up.sh: local: $ifconfig_local remote: $ifconfig_remote device: $dev\"\n\nThe content of ''down.sh'' should look like this:\n #!/bin/bash\n \n source \"`dirname $0`/vpn_config.sh\"\n \n logger \"OpenVPN down.sh: bridge if: $VPNBRIDGE_IF addr: $VPNBRIDGE_ADDR table: $VPNBRIDGE_TBL openvpn local: $ifconfig_local\"\n \n ip rule del from $VPNBRIDGE_ADDR lookup $VPNBRIDGE_TBL\n iptables -t nat -D POSTROUTING -s $VPNBRIDGE_ADDR -j SNAT --to-source $ifconfig_local\n ip tuntap del dev $VPNBRIDGE_IF mode tun\n\nFinally, the common configurable parameters for both of these scripts is found in another script named ''vpn_config.sh''. Its contents should look like this:\n #!/bin/bash\n \n export VPNBRIDGE_IF=vpnbridge0\n export VPNBRIDGE_ADDR=10.202.101.1\n export VPNBRIDGE_TBL=openvpn\n\nThese three scripts should be placed in the same directory and must be marked as executable (chmod +x).\n\n==Theory of Operation==\nThis solution is probably overcomplicated, but this is the best I could do with the limited networking skills I have. That being said, I'll attempt to explain the method here.\n\nThe ''route-up.sh'' script creates a new virtual tunnel network interface (named vpnbridge0) with the IP address which was provided for the tcp_outgoing_address parameter in the Squid configuration file (10.202.101.1). Additionally, the script instructs the kernel to route any traffic from that address to the custom 'openvpn' routing table. So when traffic is emitted from the proxy, it gets passed to the openvpn routing table but since the source IP address doesn't match the dynamic address provided by the VPN server, the request fails. To get around this, iptables NAT feature is used to rewrite the source address of the traffic to match that of the VPN client's local IP address. This makes the VPN software happy, and the traffic can flow!\n\nAs far as I can tell, this is how the traffic ends up flowing:\n* A client sends a request to Squid.\n* Squid binds to 10.202.101.1 and emits the request.\n* The kernel's routing chain prepares to send the traffic to the route defined in the custom 'openvpn' routing table.\n* The iptables POSTROUTING chain notices the packet has a source address of 10.202.101.1, so it rewrites it to match the $ifconfig_local address.\n* The traffic is put onto the VPN's virtual network interface and VPN server handles the rest."
                    }
                ]
            }
        }
    }
}