We present a new immersed boundary method for the simulation of compressible viscous flow. The method is based on the singular source approach where the immersed boundary adds surface singularities to the governing equations. The strengths of the surface singularities are treated as algebraic variables under the framework of differential-algebraic equations and are implicitly calculated to enforce the corresponding boundary conditions. Discrete delta functions are used to approximate the surface singularities in the Eulerian grid and interpolate variables back to the surface mesh. A half-explicit Runge-Kutta method is used to achieve desired temporal accuracy. The method has been generalized from the well-known no-slip and isothermal condition to stress and heat flux conditions. The latter necessitates the introduction of further singularities in the stresses and heat flux, which is a new feature of the formulation. Furthermore, the approach has been extended to porous surfaces. The method is also applicable to flow-structure interaction problems. Two- and three-dimensional numerical tests are carried out to demonstrate accuracy. The results are compared with previous numerical and experimental studies or analytical solutions. Finally, a fully three-dimensional fluid-structure interaction simulation of a subsonic parachute is showcased to demonstrate applicability to a real problem.