To do that will likely require serious surgery to the telescopic sight. Ok let's assume that all you need to do is place the camera sensor at the eye point. I didn't think it would work, but I have been told by someone that they managed it with a spotting scope and it should be the same for a telescopic sight. The exit pupil size is easy to find, it is simply the objective lens diameter divided by the magnification. There are I think some 2.5-10×56 scopes available which will get you to 22.4mm on the exit pupil, at least when used at the 2.5× magnification end. Zoom it in to 10× and you are down to a 5.6mm exit pupil. Other than that I remember seeing some big game stuff from one of the German manufacturer that gave 1.5×32, which is 21.3mm. Anything of a more normal range for a scope, 4×40 or 3-9×40 is under 15mm, and probably around 10mm. There is good reason for this, going from memory the on average the human pupil only dilates to around 12mm even in total darkness. Having the exit pupil be just a little smaller than the pupil diameter is good, as it means you need to be careful with your eye placement, reducing the likelihood of parallax errors when shooting. The low mag big game scopes differ since sometimes it may be better to be an inch out due to parallax error, but have a sight picture when the large game is trying to kill you.
If possible you will want to use an EFR scope, to give you a bit more working space. The average scope seems to have an eye relief of about 50mm/2", which is going to be tight for Z axis alignment with the sensor, which in Canon cameras has a registration distance of IIRC 46mm from the front surface of the mount. You will need to build some sort of clamping mount that will fit the eye bell of your scope. I would probably build this with the threads to fit a T-mount, you the at least have the advantage that you can change the mount easily, and fitting the threaded section at least saves you from potentially buggering up the bayonet mount in the effort to fit it. You will really need to build in some sort of helical movement system to that you can fine tune the eye relief, since there is a good chance it will drift with temperature. You will also need to make sure that your mounting system still allows easy access to the ocular focus ring on the back of the scope, since again there is quite a strong likelihood of the reticle focus drifting with both temperature and parallax adjustment. You will need to use a scope with parallax adjustment, since the camera won't have any accomodation to fix a misfocused target. The ocular adjustment access will also need to be light tight, although I would think that all that would be needed is something that will cover the access port while actually shooting.
So now you have your camera mounted to the scope, you can position the sensor correctly for eye relief, and you can set focus for both the reticle and the target. So what sort of firearm are you considering fitting this to? Well the only firearm that I would mount a scope with DSLR attached to would be a Pre-Charged Pneumatic air rifle that produces less than about 20 Joules of muzzle energy. Anything above that energy in PCP, and any sort of cartridge firearm will be producing recoil/vibration that things like the mirror assembly and shutter were not designed to operate under. Remember that the camera body is going to be very rigidly mounted to the firearm, so everything will be transmitted to the scope, and then the camera. This is likely to rapidly bring on failure of the mechanical moving parts of the camera. Fit ti to pretty much any cartridge firearm and you will also potentially damage PCB's and subsidiary optical components such as the AF systems and OVF. Fitting it to just about any spring/piston powered air rifle will destroy the camera within a few dozen (I'm being generous here) shots at most. The "Nitro" powered systems that use a gas strut to replace a spring/piston still operate in the same way, and will have the same damaging effect. A .700NE will be less damaging to the camera than the spring/piston air rifle.
A note now on mounting the scope. A DSLR is a pretty heavy object to hang from the back end of a scope. So your scope really must be a single tube design. I would be mounting it with three rings, one either end of the rear tube section, and one on the front section. You will also want to lapp the rings to ensure they are correctly aligned, since you have that extra ring keeping the back end of the scope tube from sagging any more than is absolutely necessary. You don't want the centerline of the scope tube dropping away from the optical axis thanks to the weight of the camera. Finally the image from the camera will be inverted and reflected, both in the images from the camera, and in the OVF. This is because the scope erects the image for you when viewing it normally.
You could remove the rear eyepiece from the scope, they mostly just unscrew out, the thread is very fine so it take a while. Scope eyepieces tend to be pretty high magnification, I have a few taken from scopes with broken reticles that I use as high power magnifiers. The ones I have from 3-9×40 scopes the complete eyepiece has about twice the magnification of the objective. Unfortunately the one thing I never tried doing when stripping down a scope was to see if I could use it to project and image on a surface. My suspicions are that you would need to build a new optical cell to replace the eyepiece before it was practical to use it with a camera body. Even with the optical problems solved you still have all of the problems associated with having a big heavy delicate camera mounted to the back of the scope.
There are some commercial systems available that allow the fitting of a camera to a telescopic sight. None of these work with a DSLR, probably for the reasons already stated. The first, and simplest is a product call i-Sight. I don't know if they still make them, the one I saw was for I think an iPhone 5 or maybe 6. They didn't sell well. This as the name suggests allows you to mount the iPhone to the scope so that you can use it to record video or take photos. Although it clamps around the eye bell it has a slightly flexible tube connecting ti to the phone holder portion. That flexibility is what, along with the phone pretty much not having any moving parts protects it from damage by recoil from the gun.
The other system that I have tested uses a small lightweight video camera, similar to the ones used for reversing cameras in cars. This works in IR as well as normal light, so it is really designed for shooting small game, and pests at night, something that is legal here in the UK. It's designed for use with PCP air rifles, and .22LR. Again the camera is mounted to the back of the scope by a slightly flexible tube, allowing the easy alignment of the camera. The system is designed to work with a scope giving roughly a 10mm exit pupil, so a 4×40 would be perfect. Being a small sensor camera with a very short focal length lens the DoF is sufficient to deal with being a little off from the exact eye relief. They do recommend that you use a parallax adjustable scope, so that you can get focus at the required range. An illuminated reticle can help at night too. This system has an integrated display and IR illuminator that is easy to mount above the scope. These are commercially available, but people had been using similar cameras like this on scopes as home builds for quite a number of years. The one thing they do do is make you have to shoot in a different way, since you now have to have your head away from the stock and use the electronic display. This can of course mean that when using the system you may get a zero shift from the changed position.
I have been shooting pretty much as long as I have been taking photos, I got my first air rifle at age seven. I think I had already had my Kodak Instamatic for a little while. In my time I was a pretty reasonable competitive shooter, having been in various RAF teams, and represented both the Combined Services and Wales. I've worked in the gun trade here doing various different jobs now for over 20 years. Mounting cameras on telescopic sights have been projects that were considered. The conclusions every time have always been that mounting anything bigger than a gopro sized camera isn't really viable, and that potential sales are not really great enough do make the UKor even EU markert worthwhile. Going to China to have a product made for sale in the US market, all while being based in the UK seems overly complex to consider. From talking to a number of people the IR camera system people will put up with, because it works nearly was well as many image intensifier systems, and much better than most of the entry level ones. Otherwise people try out the lightweight camera/phone mounts, use it once and realise it just gets in the way, and they ditch it. I think the only time the camera mounted on the scope is likely to be useful to a shooter long term is for those who are disabled. Usually though this will be a custom install with specific individual needs.
Sorry for such a long post, that is mostly negative. This is a subject to which I have applied considerable thought to over many years now.
Alan