The purpose of this paper is defining a new boundary value problem for Yang-Mills connections, which is the most general in the context of Neumann-type problems for forms. We achieve this by reflecting the base manifold across the boundary, and lifting this action non-trivially to the bundle. This way we obtain a twisted boundary value problem in which the boundary conditions are mixed, of Dirichlet type on some of the Lie-algebra components of the connection A, of Neumann type on others. This problem arises naturally and it can be viewed in the context of generalizing non-linear Hedge theory for connections. We prove a good gauge theorem for this problem. We give an application.