The invention relates to a device for connecting a pump, having a through-hole (42) provided in a prosthesis shaft (36), wherein the device comprises at least one channel (6) having a first outlet (4) for connecting to the through-hole (42) in the prosthesis shaft (36) and a second outlet (14) which can be connected to the pump and at least one valve (24), characterized in that the valve (24) can be switched to a first mode and to a second mode, wherein the valve (24) is a one-way valve in the first mode and a two-way valve in the second mode.