The best rust inhibitor for blued steel firearms surfaces is barium sulphonate in a wax film. Petroleum wax admixed with barium sulphonate is dissolved in xylene to form a liquid. The xylene evaporates after application, leaving a corrosion inhibiting wax film. Barium sulphonate inhibits both electrolysis and bacterial growth, the major causes of rust. GI specification is
MIL-PRF-16173E Grade 2 Class 1.
These rust inhibitors provide two years or more of outdoor corrosion protection - in the rain and snow - and outlive you in their protection indoors. You remove them with xylene. Beneficial to most metals, woods, and leathers. Not suitable for use on metals which react with sulphur: nickel, copper, brass, bronze, silver, etc. Low toxicity and modest flammability in liquid form prior to application. Leaves a soft waxy film which conceals minor imperfections and allows some handling (self healing).
Most readily available MIL-PRF-16173E Grade 2 Class 1 inhibitor for civilians is LPS 3:
http://www.lpslabs.com/product-details/612
You can buy it at Grainger's or Bearing Service Downriver.
Expensive, but well worth the money. Many other manufacturers, but their minimum lot sizes are beyond the needs of a typical gun owner. Far superior to rust inhibiting oils which depend upon surface tension effects to exclude moisture. The surface tension effect behind rust inhibiting oils' action assures that the better such products evaporate quickly. Wax does not evaporate.