While I'm thinking about it:
Cleaning the gas system is pretty simple, but takes a little bit of time. I remove the upper hand guard and totally remove the gas system - pull the gas cup, remove the op rod, unscrew the piston. The inside of the handguard gets a wipe-down with a damp cloth to remove the fouling that's inevitably there, as does the lower wood. I wipe down the barrel with some hoppes because, again, you're going to have fouling there and that will rust eventually if it's corrosive. Back when I shot corrosive in my semi-autos I'd also de-stock the action once a year to make damn sure I didn't have any residue hiding under the woodline because, again, rust. Starting to see why I don't shoot corrosive any more?
Wipe down the op-rod etc. with a solvent rag. I flush the inside of the cup with solvent (usually I just fill it half-way with hoppes, stick my finger over the end, and shake it back and forth for a minute), and then I flush the inside of the piston with solvent. That can get a bit fiddly, and having something compressed in a can helps a lot.
Then I hose out the gas block with solvent. Turn the gun upside down, point the muzzle down, and drip/spray solvent through it until it's running out the gas port and out the barrel. That should get the worst of the buildup out and prevent rusting, but "should" is doing a lot of heavy lifting in that sentence and it's also part of why I don't shoot corrosive any more.
After that, clean the barrel as you normally would. Make sure to also run a rag around the inside of the receiver get any stray soot. Disassemble the bolt, wipe it down with a solvent rag, dry it, and re-oil it. Pay special attention to the bolt face.
Make sure you do all this as soon as you get home, every single range trip.
Or, you know, don't shoot corrosive out of expensive guns and use the same cleaning regimen you'd use for any other rifle. I still swab out my barrel within a few days of every range trip, but it's easily been a couple years since I did the full gas system tear down and deep clean. I just pulled it out of my safe and popped the hand guard off to take a quick look at the piston and cup and nope, still no rust. They're dirty though.