A tunable optical rail is embedded into the cavity of a nonlinear-polarization-rotation (NPR) mode-locked fiber laser to generate a sampling pulse with different repetition frequencies and realize bit-rate-adaptive software synchronous optical sampling. Two ultrashort pulses (20.26677 and 20.22900 MHz) are derived, and a 100-MHz data signal is sampled twice with these pulses based on sum-frequency generation (SFG) in periodically poled lithium niobate (PPLN). The eye diagram is successfully reco